For Android there is no need to expicitly link pthread lib.
Change-Id: Ifbd1c6fb91a9e8c6e5d50aa2b2ff7684fbb248a9
See: https://groups.google.com/forum/#!topic/android-ndk/Dq05en_xoN8
Reviewed-on: https://boringssl-review.googlesource.com/22084
Reviewed-by: Matt Braithwaite <mab@google.com>
Commit-Queue: Matt Braithwaite <mab@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/util/BUILD.toplevel b/util/BUILD.toplevel
index af7bd30..6e569ec 100644
--- a/util/BUILD.toplevel
+++ b/util/BUILD.toplevel
@@ -46,6 +46,11 @@
values = {"cpu": "x64_windows"},
)
+config_setting(
+ name = "android",
+ values = {"crosstool_top": "//external:android/crosstool"}
+)
+
posix_copts = [
# Assembler option --noexecstack adds .note.GNU-stack to each object to
# ensure that binaries can be built with non-executable stack.
@@ -120,6 +125,9 @@
includes = ["src/include"],
linkopts = select({
":mac_x86_64": [],
+ # Android supports pthreads, but does not provide a libpthread
+ # to link against.
+ ":android": [],
"//conditions:default": ["-lpthread"],
}),
visibility = ["//visibility:public"],