Merge pull request #1386 from andrewharp/patch-2

Do not link in pthread library for Android builds.
This commit is contained in:
Feng Xiao 2016-04-05 10:40:28 -07:00
commit f3fe75bae5

14
BUILD
View File

@ -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",