mirror of
https://github.com/google/benchmark.git
synced 2025-03-26 11:24:42 +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": [],
|
":windows": [],
|
||||||
"//conditions:default": posix_copts,
|
"//conditions:default": posix_copts,
|
||||||
}),
|
}),
|
||||||
local_defines = select({
|
# Only static linking is allowed; no .so will be produced.
|
||||||
":windows": ["benchmark_EXPORTS"],
|
# Using `defines` (i.e. not `local_defines`) means that no
|
||||||
"//conditions:default": [],
|
# dependent rules need to bother about defining the macro.
|
||||||
}),
|
linkstatic = True,
|
||||||
|
defines = ["BENCHMARK_STATIC_DEFINE"],
|
||||||
)
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
|
@ -14,7 +14,6 @@ def py_extension(name, srcs, hdrs = [], copts = [], features = [], deps = []):
|
|||||||
copts = copts,
|
copts = copts,
|
||||||
features = features,
|
features = features,
|
||||||
deps = deps,
|
deps = deps,
|
||||||
local_defines = ["BENCHMARK_STATIC_DEFINE"],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return native.py_library(
|
return native.py_library(
|
||||||
|
Loading…
Reference in New Issue
Block a user