xref: /aosp_15_r20/external/protobuf/objectivec/BUILD.bazel (revision 1b3f573f81763fcece89efc2b6a5209149e44ab8)
1load("@rules_cc//cc:defs.bzl", "objc_library")
2load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
3
4objc_library(
5    name = "objectivec",
6    hdrs = [
7        "GPBAny.pbobjc.h",
8        "GPBApi.pbobjc.h",
9        "GPBDuration.pbobjc.h",
10        "GPBEmpty.pbobjc.h",
11        "GPBFieldMask.pbobjc.h",
12        "GPBSourceContext.pbobjc.h",
13        "GPBStruct.pbobjc.h",
14        "GPBTimestamp.pbobjc.h",
15        "GPBType.pbobjc.h",
16        "GPBWrappers.pbobjc.h",
17        "GPBArray.h",
18        "GPBBootstrap.h",
19        "GPBCodedInputStream.h",
20        "GPBCodedOutputStream.h",
21        "GPBDescriptor.h",
22        "GPBDictionary.h",
23        "GPBExtensionInternals.h",
24        "GPBExtensionRegistry.h",
25        "GPBMessage.h",
26        "GPBProtocolBuffers.h",
27        "GPBProtocolBuffers_RuntimeSupport.h",
28        "GPBRootObject.h",
29        "GPBRuntimeTypes.h",
30        "GPBUnknownField.h",
31        "GPBUnknownFieldSet.h",
32        "GPBUtilities.h",
33        "GPBWellKnownTypes.h",
34        "GPBWireFormat.h",
35        "google/protobuf/Any.pbobjc.h",
36        "google/protobuf/Api.pbobjc.h",
37        "google/protobuf/Duration.pbobjc.h",
38        "google/protobuf/Empty.pbobjc.h",
39        "google/protobuf/FieldMask.pbobjc.h",
40        "google/protobuf/SourceContext.pbobjc.h",
41        "google/protobuf/Struct.pbobjc.h",
42        "google/protobuf/Timestamp.pbobjc.h",
43        "google/protobuf/Type.pbobjc.h",
44        "google/protobuf/Wrappers.pbobjc.h",
45        # Package private headers, but exposed because the generated sources
46        # need to use them.
47        "GPBArray_PackagePrivate.h",
48        "GPBCodedInputStream_PackagePrivate.h",
49        "GPBCodedOutputStream_PackagePrivate.h",
50        "GPBDescriptor_PackagePrivate.h",
51        "GPBDictionary_PackagePrivate.h",
52        "GPBMessage_PackagePrivate.h",
53        "GPBRootObject_PackagePrivate.h",
54        "GPBUnknownFieldSet_PackagePrivate.h",
55        "GPBUnknownField_PackagePrivate.h",
56        "GPBUtilities_PackagePrivate.h",
57    ],
58    copts = [
59        "-Wno-vla",
60    ],
61    includes = [
62        ".",
63    ],
64    non_arc_srcs = [
65        "GPBAny.pbobjc.m",
66        "GPBApi.pbobjc.m",
67        "GPBArray.m",
68        "GPBCodedInputStream.m",
69        "GPBCodedOutputStream.m",
70        "GPBDescriptor.m",
71        "GPBDictionary.m",
72        "GPBDuration.pbobjc.m",
73        "GPBEmpty.pbobjc.m",
74        "GPBExtensionInternals.m",
75        "GPBExtensionRegistry.m",
76        "GPBFieldMask.pbobjc.m",
77        "GPBMessage.m",
78        "GPBRootObject.m",
79        "GPBSourceContext.pbobjc.m",
80        "GPBStruct.pbobjc.m",
81        "GPBTimestamp.pbobjc.m",
82        "GPBType.pbobjc.m",
83        "GPBUnknownField.m",
84        "GPBUnknownFieldSet.m",
85        "GPBUtilities.m",
86        "GPBWellKnownTypes.m",
87        "GPBWireFormat.m",
88        "GPBWrappers.pbobjc.m",
89    ],
90    visibility = ["//visibility:public"],
91)
92
93pkg_files(
94    name = "dist_files",
95    srcs = glob([
96        "*.h",
97        "*.m",
98        "**/*.h",
99        "**/*.m",
100        "**/*.mm",
101        "**/*.swift",
102        "DevTools/*.sh",
103        "DevTools/*.py",
104        "ProtocolBuffers_iOS.xcodeproj/**/*",
105        "ProtocolBuffers_OSX.xcodeproj/**/*",
106        "ProtocolBuffers_tvOS.xcodeproj/**/*",
107        "Tests/CocoaPods/**/*",
108        "Tests/*.pddm",
109        "Tests/*.txt",
110        "Tests/*.plist",
111        "Tests/*.proto",
112    ]) + [
113        ".clang-format",
114        "BUILD.bazel",
115        "README.md",
116        "Tests/golden_message",
117        "Tests/golden_packed_fields_message",
118        "generate_well_known_types.sh",
119    ],
120    strip_prefix = strip_prefix.from_root(""),
121    visibility = ["//pkg:__pkg__"],
122)
123