[go: nahoru, domu]

Skip to content

Commit

Permalink
Include lrt on linux but not on mac os.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 388971884
Change-Id: Ib880f4547dd549561e21634f48b42526b6c10416
  • Loading branch information
aselle authored and tensorflower-gardener committed Aug 5, 2021
1 parent 26445da commit 3ff025d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions third_party/benchmark/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ config_setting(
visibility = [":__subpackages__"],
)

config_setting(
name = "macos",
constraint_values = [
"@bazel_tools//platforms:osx",
],
)

cc_library(
name = "benchmark",
srcs = glob(
Expand All @@ -34,6 +41,7 @@ cc_library(
hdrs = ["include/benchmark/benchmark.h"],
linkopts = select({
":windows": ["-DEFAULTLIB:shlwapi.lib"],
":macos": ["-lpthread"],
"//conditions:default": [
"-pthread",
"-lrt",
Expand Down

0 comments on commit 3ff025d

Please sign in to comment.