aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@google.com>2016-04-05 10:40:28 -0700
committerFeng Xiao <xiaofeng@google.com>2016-04-05 10:40:28 -0700
commitf3fe75bae54a06e20295b4777de46d6365481dac (patch)
tree1f1ba23be3157fa4e9ecbc9e2d3b2066e8576ee5
parenta771c9e11c4cd0350db9e7fbae977e9aeea468b8 (diff)
parent3b4e7dcf290b32695c13594e0e465de181ae87c0 (diff)
downloadprotobuf-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--BUILD14
1 files changed, 12 insertions, 2 deletions
diff --git a/BUILD b/BUILD
index e35a2e8e..1615486f 100644
--- a/BUILD
+++ b/BUILD
@@ -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",