mirror of
https://github.com/google/benchmark.git
synced 2025-02-23 09:40:27 +08:00
* Change nanobind linkage to response file approach This change needs https://github.com/bazelbuild/bazel/pull/18952 to be merged first. Fixes macOS linkage of GBM's nanobind bindings on macOS by supplying a linker response file instead of `-undefined dynamic_lookup`. The latter has since been deprecated on macOS. * Fix bazel_skylib checksum, bump skylib version in MODULE.bazel * Bump Bazel to version 6.4.0 for linker response file support
34 lines
811 B
Plaintext
34 lines
811 B
Plaintext
licenses(["notice"])
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
filegroup(
|
|
name = "symboltable",
|
|
srcs = ["cmake/darwin-ld-cpython.sym"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "nanobind",
|
|
srcs = glob([
|
|
"src/*.cpp"
|
|
]),
|
|
copts = ["-fexceptions"],
|
|
includes = ["include", "ext/robin_map/include"],
|
|
textual_hdrs = glob(
|
|
[
|
|
"include/**/*.h",
|
|
"src/*.h",
|
|
"ext/robin_map/include/tsl/*.h",
|
|
],
|
|
),
|
|
linkopts = select({
|
|
"@platforms//os:macos": ["-Wl,@$(location :cmake/darwin-ld-cpython.sym)"],
|
|
"//conditions:default": [],
|
|
}),
|
|
additional_linker_inputs = select({
|
|
"@platforms//os:macos": [":cmake/darwin-ld-cpython.sym"],
|
|
"//conditions:default": [],
|
|
}),
|
|
deps = ["@python_headers"],
|
|
)
|