diff options
author | Pete Warden <pete@petewarden.com> | 2016-02-23 10:18:32 -0800 |
---|---|---|
committer | Pete Warden <pete@petewarden.com> | 2016-02-23 10:18:32 -0800 |
commit | cb39204af85533f1905b5715908c51adc46ca610 (patch) | |
tree | 84061ffda053e80b09c1f59fe4169a415a1dabee | |
parent | 8f67b165f0a949219fafc48c533be3fbf53497b7 (diff) | |
download | protobuf-cb39204af85533f1905b5715908c51adc46ca610.tar.gz protobuf-cb39204af85533f1905b5715908c51adc46ca610.tar.bz2 protobuf-cb39204af85533f1905b5715908c51adc46ca610.zip |
Updated library generation with iOS options
-rw-r--r-- | BUILD | 29 |
1 files changed, 27 insertions, 2 deletions
@@ -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"], |