Merge pull request #3757 from spinorx/master

Fix iOS cc_library build for protobuf.
pull/3745/merge
Jisi Liu 7 years ago committed by GitHub
commit b189389e2f
  1. 45
      BUILD

45
BUILD

@ -61,37 +61,6 @@ load(
"internal_protobuf_py_tests",
)
config_setting(
name = "ios_armv7",
values = {
"ios_cpu": "armv7",
},
)
config_setting(
name = "ios_armv7s",
values = {
"ios_cpu": "armv7s",
},
)
config_setting(
name = "ios_arm64",
values = {
"ios_cpu": "arm64",
},
)
IOS_ARM_COPTS = [
"-DOS_IOS",
"-miphoneos-version-min=7.0",
"-arch armv7",
"-arch armv7s",
"-arch arm64",
"-D__thread=",
"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk/",
]
cc_library(
name = "protobuf_lite",
srcs = [
@ -123,12 +92,7 @@ cc_library(
"src/google/protobuf/wire_format_lite.cc",
],
hdrs = glob(["src/google/protobuf/**/*.h"]),
copts = select({
":ios_armv7": IOS_ARM_COPTS,
":ios_armv7s": IOS_ARM_COPTS,
":ios_arm64": IOS_ARM_COPTS,
"//conditions:default": [],
}) + COPTS,
copts = COPTS,
includes = ["src/"],
linkopts = LINK_OPTS,
visibility = ["//visibility:public"],
@ -195,12 +159,7 @@ cc_library(
"src/google/protobuf/wrappers.pb.cc",
],
hdrs = glob(["src/**/*.h"]),
copts = select({
":ios_armv7": IOS_ARM_COPTS,
":ios_armv7s": IOS_ARM_COPTS,
":ios_arm64": IOS_ARM_COPTS,
"//conditions:default": [],
}) + COPTS,
copts = COPTS,
includes = ["src/"],
linkopts = LINK_OPTS,
visibility = ["//visibility:public"],

Loading…
Cancel
Save