diff options
Diffstat (limited to 'BUILD')
-rw-r--r-- | BUILD | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -9,6 +9,11 @@ licenses(["notice"]) exports_files(["LICENSE"]) config_setting( + name = "darwin", + values = {"cpu": "darwin"}, +) + +config_setting( name = "windows", values = {"cpu": "x64_windows"}, ) @@ -73,6 +78,10 @@ cc_library( "//conditions:default": ["-pthread"], }), linkopts = select({ + # Darwin doesn't need `-pthread' when linking and it appears that + # older versions of Clang will warn about the unused command line + # argument, so just don't pass it. + ":darwin": [], ":windows": [], ":windows_msvc": [], "//conditions:default": ["-pthread"], @@ -225,13 +234,5 @@ cc_binary( name = "regexp_benchmark", testonly = 1, srcs = ["re2/testing/regexp_benchmark.cc"], - linkopts = select({ - ":windows": [], - ":windows_msvc": [], - "//conditions:default": [ - "-lm", - "-lrt", - ], - }), deps = [":benchmark"], ) |