diff --git a/third_party/benchmark/BUILD.bazel b/third_party/benchmark/BUILD.bazel index 1539b2cc86a17e..75242ad4ddecb7 100644 --- a/third_party/benchmark/BUILD.bazel +++ b/third_party/benchmark/BUILD.bazel @@ -22,6 +22,13 @@ config_setting( visibility = [":__subpackages__"], ) +config_setting( + name = "macos", + constraint_values = [ + "@bazel_tools//platforms:osx", + ], +) + cc_library( name = "benchmark", srcs = glob( @@ -34,6 +41,7 @@ cc_library( hdrs = ["include/benchmark/benchmark.h"], linkopts = select({ ":windows": ["-DEFAULTLIB:shlwapi.lib"], + ":macos": ["-lpthread"], "//conditions:default": [ "-pthread", "-lrt",