From fadc975bf9f256b0cfc6af9dc5e9d22011dfc84c Mon Sep 17 00:00:00 2001 From: Param Reddy Date: Mon, 23 Oct 2017 09:37:03 -0700 Subject: [PATCH] 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 Commit-Queue: Matt Braithwaite CQ-Verified: CQ bot account: commit-bot@chromium.org --- util/BUILD.toplevel | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/BUILD.toplevel b/util/BUILD.toplevel index af7bd303f..6e569ec82 100644 --- a/util/BUILD.toplevel +++ b/util/BUILD.toplevel @@ -46,6 +46,11 @@ config_setting( 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 @@ cc_library( 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"],