diff options
author | Feng Xiao <xiaofeng@google.com> | 2016-04-05 10:40:28 -0700 |
---|---|---|
committer | Feng Xiao <xiaofeng@google.com> | 2016-04-05 10:40:28 -0700 |
commit | f3fe75bae54a06e20295b4777de46d6365481dac (patch) | |
tree | 1f1ba23be3157fa4e9ecbc9e2d3b2066e8576ee5 | |
parent | a771c9e11c4cd0350db9e7fbae977e9aeea468b8 (diff) | |
parent | 3b4e7dcf290b32695c13594e0e465de181ae87c0 (diff) | |
download | protobuf-f3fe75bae54a06e20295b4777de46d6365481dac.tar.gz protobuf-f3fe75bae54a06e20295b4777de46d6365481dac.tar.bz2 protobuf-f3fe75bae54a06e20295b4777de46d6365481dac.zip |
Merge pull request #1386 from andrewharp/patch-2
Do not link in pthread library for Android builds.
-rw-r--r-- | BUILD | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -15,8 +15,18 @@ COPTS = [ "-Wno-error=unused-function", ] -# Bazel should provide portable link_opts for pthread. -LINK_OPTS = ["-lpthread"] +config_setting( + name = "android", + values = { + "crosstool_top": "//external:android/crosstool", + }, +) + +# Android builds do not need to link in a separate pthread library. +LINK_OPTS = select({ + ":android": [], + "//conditions:default": ["-lpthread"], +}) load( "protobuf", |