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