Remove -Bsymolink link option on macOS. (#10)
This removes the hardcoded link option -Bsymbolic which is specific to
GNU's linker when running on macOS.
diff --git a/build_defs.bzl b/build_defs.bzl
index 651b800..f857776 100644
--- a/build_defs.bzl
+++ b/build_defs.bzl
@@ -39,9 +39,10 @@
name = name + ".so",
copts = copts + PYBIND_COPTS + ["-fvisibility=hidden"],
features = features + PYBIND_FEATURES,
- linkopts = [
- "-Wl,-Bsymbolic",
- ],
+ linkopts = select({
+ "@pybind11//:darwin": ["-Wl"],
+ "//conditions:default": ["-Wl,-Bsymbolic"],
+ }),
linkshared = 1,
tags = tags + ["local", "manual"],
deps = deps + PYBIND_DEPS,
diff --git a/pybind11.BUILD b/pybind11.BUILD
index 1367827..ce0fc70 100644
--- a/pybind11.BUILD
+++ b/pybind11.BUILD
@@ -34,3 +34,9 @@
includes = ["include"],
deps = ["@local_config_python//:python_headers"],
)
+
+config_setting(
+ name = "darwin",
+ values = {"cpu": "darwin"},
+ visibility = ["//visibility:public"],
+)