PiperOrigin-RevId: 315313209
Change-Id: I5d86e271b7733cf16d9b8de98d1c2ee69764608f
This commit is contained in:
Benoit Jacob 2020-06-08 11:13:34 -07:00 committed by TensorFlower Gardener
parent 4f4f5db82f
commit a5e5e94904
2 changed files with 23 additions and 2 deletions

View File

@ -19,11 +19,20 @@ cc_library(
":windows": [], ":windows": [],
"//conditions:default": ["-Wno-unused-result"], "//conditions:default": ["-Wno-unused-result"],
}), }),
defines = select({
# When linkstatic=False, we need default visibility
":macos_x86_64": ["CLOG_VISIBILITY="],
"//conditions:default": [],
}),
linkopts = select({ linkopts = select({
":android": ["-llog"], ":android": ["-llog"],
"//conditions:default": [], "//conditions:default": [],
}), }),
linkstatic = True, linkstatic = select({
# https://github.com/bazelbuild/bazel/issues/11552
":macos_x86_64": False,
"//conditions:default": True,
}),
strip_include_prefix = "deps/clog/include", strip_include_prefix = "deps/clog/include",
) )
@ -36,3 +45,11 @@ config_setting(
name = "windows", name = "windows",
values = {"cpu": "x64_windows"}, values = {"cpu": "x64_windows"},
) )
config_setting(
name = "macos_x86_64",
values = {
"apple_platform_type": "macos",
"cpu": "darwin",
},
)

View File

@ -125,7 +125,11 @@ cc_library(
"-Iexternal/cpuinfo/include", "-Iexternal/cpuinfo/include",
"-Iexternal/cpuinfo/src", "-Iexternal/cpuinfo/src",
], ],
linkstatic = True, linkstatic = select({
# https://github.com/bazelbuild/bazel/issues/11552
":macos_x86_64": False,
"//conditions:default": True,
}),
# Headers must be in textual_hdrs to allow us to set the standard to C99 # Headers must be in textual_hdrs to allow us to set the standard to C99
textual_hdrs = [ textual_hdrs = [
"include/cpuinfo.h", "include/cpuinfo.h",