aboutsummaryrefslogtreecommitdiffhomepage
path: root/BUILD
diff options
context:
space:
mode:
authorGravatar Pete Warden <pete@petewarden.com>2016-02-23 10:18:32 -0800
committerGravatar Pete Warden <pete@petewarden.com>2016-02-23 10:18:32 -0800
commitcb39204af85533f1905b5715908c51adc46ca610 (patch)
tree84061ffda053e80b09c1f59fe4169a415a1dabee /BUILD
parent8f67b165f0a949219fafc48c533be3fbf53497b7 (diff)
Updated library generation with iOS options
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD29
1 files changed, 27 insertions, 2 deletions
diff --git a/BUILD b/BUILD
index c4de1c4c..8667cc48 100644
--- a/BUILD
+++ b/BUILD
@@ -26,6 +26,25 @@ load(
"internal_protobuf_py_tests",
)
+config_setting(
+ name = "ios_arm",
+ values = {
+ "ios_cpu": "armv7",
+ "ios_cpu": "armv7s",
+ "ios_cpu": "arm64",
+ },
+)
+
+IOS_ARM_COPTS = 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 = [
@@ -55,7 +74,10 @@ cc_library(
"src/google/protobuf/wire_format_lite.cc",
],
hdrs = glob(["src/google/protobuf/**/*.h"]),
- copts = COPTS,
+ copts = select({
+ ":ios_arm": IOS_ARM_COPTS,
+ "//conditions:default": COPTS,
+ }),
includes = ["src/"],
linkopts = LINK_OPTS,
visibility = ["//visibility:public"],
@@ -120,7 +142,10 @@ cc_library(
"src/google/protobuf/wrappers.pb.cc",
],
hdrs = glob(["src/**/*.h"]),
- copts = COPTS,
+ copts = select({
+ ":ios_arm": IOS_ARM_COPTS,
+ "//conditions:default": COPTS,
+ }),
includes = ["src/"],
linkopts = LINK_OPTS,
visibility = ["//visibility:public"],