mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 20:40:21 +08:00
Build //:benchmark
as a static library only. (#1373)
If someone or something ever needs the dynamic library as a Bazel build artifact, we can figure that out for them then, but right now, there is no strong reason to be wrangling various `export.h`-controlling macros. Fixes #1372.
This commit is contained in:
parent
5704cd4c8c
commit
6a894bd555
@ -55,10 +55,11 @@ cc_library(
|
||||
":windows": [],
|
||||
"//conditions:default": posix_copts,
|
||||
}),
|
||||
local_defines = select({
|
||||
":windows": ["benchmark_EXPORTS"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
# Only static linking is allowed; no .so will be produced.
|
||||
# Using `defines` (i.e. not `local_defines`) means that no
|
||||
# dependent rules need to bother about defining the macro.
|
||||
linkstatic = True,
|
||||
defines = ["BENCHMARK_STATIC_DEFINE"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
|
@ -14,7 +14,6 @@ def py_extension(name, srcs, hdrs = [], copts = [], features = [], deps = []):
|
||||
copts = copts,
|
||||
features = features,
|
||||
deps = deps,
|
||||
local_defines = ["BENCHMARK_STATIC_DEFINE"],
|
||||
)
|
||||
|
||||
return native.py_library(
|
||||
|
Loading…
Reference in New Issue
Block a user