Commit 18aa2961 authored by Thomas Van Lenten's avatar Thomas Van Lenten

Collapse :protobuf_objc and :objectivec targets.

Not sure the history for why there were two objc_library targets, but
given the one has an issue about not working, merge them into a single
target and an alias.

- Use the alias for :objectivec since that naming doesn't seem to follow
  the other targets *_library targets here.
- Update :protobuf_objc to be use for the working target and just inline
  the sources/headers lists so there is less indirection in the file.

Fixes #5284
parent 96f7c538
...@@ -196,14 +196,6 @@ cc_library( ...@@ -196,14 +196,6 @@ cc_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
objc_library(
name = "protobuf_objc",
hdrs = ["objectivec/GPBProtocolBuffers.h"],
includes = ["objectivec"],
non_arc_srcs = ["objectivec/GPBProtocolBuffers.m"],
visibility = ["//visibility:public"],
)
# Map of all well known protos. # Map of all well known protos.
# name => (include path, imports) # name => (include path, imports)
WELL_KNOWN_PROTO_MAP = { WELL_KNOWN_PROTO_MAP = {
...@@ -861,7 +853,15 @@ proto_lang_toolchain( ...@@ -861,7 +853,15 @@ proto_lang_toolchain(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
OBJC_HDRS = [ alias(
name = "objectivec",
actual = ":protobuf_objc",
visibility = ["//visibility:public"],
)
objc_library(
name = "protobuf_objc",
hdrs = [
"objectivec/GPBArray.h", "objectivec/GPBArray.h",
"objectivec/GPBBootstrap.h", "objectivec/GPBBootstrap.h",
"objectivec/GPBCodedInputStream.h", "objectivec/GPBCodedInputStream.h",
...@@ -890,9 +890,8 @@ OBJC_HDRS = [ ...@@ -890,9 +890,8 @@ OBJC_HDRS = [
"objectivec/google/protobuf/Timestamp.pbobjc.h", "objectivec/google/protobuf/Timestamp.pbobjc.h",
"objectivec/google/protobuf/Type.pbobjc.h", "objectivec/google/protobuf/Type.pbobjc.h",
"objectivec/google/protobuf/Wrappers.pbobjc.h", "objectivec/google/protobuf/Wrappers.pbobjc.h",
] # Package private headers, but exposed because the generated sources
# need to use them.
OBJC_PRIVATE_HDRS = [
"objectivec/GPBArray_PackagePrivate.h", "objectivec/GPBArray_PackagePrivate.h",
"objectivec/GPBCodedInputStream_PackagePrivate.h", "objectivec/GPBCodedInputStream_PackagePrivate.h",
"objectivec/GPBCodedOutputStream_PackagePrivate.h", "objectivec/GPBCodedOutputStream_PackagePrivate.h",
...@@ -903,9 +902,14 @@ OBJC_PRIVATE_HDRS = [ ...@@ -903,9 +902,14 @@ OBJC_PRIVATE_HDRS = [
"objectivec/GPBUnknownFieldSet_PackagePrivate.h", "objectivec/GPBUnknownFieldSet_PackagePrivate.h",
"objectivec/GPBUnknownField_PackagePrivate.h", "objectivec/GPBUnknownField_PackagePrivate.h",
"objectivec/GPBUtilities_PackagePrivate.h", "objectivec/GPBUtilities_PackagePrivate.h",
] ],
copts = [
OBJC_SRCS = [ "-Wno-vla",
],
includes = [
"objectivec",
],
non_arc_srcs = [
"objectivec/GPBArray.m", "objectivec/GPBArray.m",
"objectivec/GPBCodedInputStream.m", "objectivec/GPBCodedInputStream.m",
"objectivec/GPBCodedOutputStream.m", "objectivec/GPBCodedOutputStream.m",
...@@ -930,18 +934,7 @@ OBJC_SRCS = [ ...@@ -930,18 +934,7 @@ OBJC_SRCS = [
"objectivec/google/protobuf/Timestamp.pbobjc.m", "objectivec/google/protobuf/Timestamp.pbobjc.m",
"objectivec/google/protobuf/Type.pbobjc.m", "objectivec/google/protobuf/Type.pbobjc.m",
"objectivec/google/protobuf/Wrappers.pbobjc.m", "objectivec/google/protobuf/Wrappers.pbobjc.m",
]
objc_library(
name = "objectivec",
hdrs = OBJC_HDRS + OBJC_PRIVATE_HDRS,
copts = [
"-Wno-vla",
],
includes = [
"objectivec",
], ],
non_arc_srcs = OBJC_SRCS,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment