Pass "-Wl,-undefined=dynamic_lookup" for dynamic libraries on darwin.
This linker flag causes undefined symbols to be ignored, which is the default behavior on linux but not macos. This is required when building shared libraries to use as e.g. Python modules. This also matches what Bazel's built-in macos cc toolchain does.nix v0.7.3
parent
921fda9260
commit
a0511ca5ee
|
@ -54,7 +54,7 @@ def _target_darwin(gocpu, zigcpu):
|
|||
"libc/include/any-macos-any",
|
||||
],
|
||||
linkopts = [],
|
||||
dynamic_library_linkopts = [],
|
||||
dynamic_library_linkopts = ["-Wl,-undefined=dynamic_lookup"],
|
||||
copts = [],
|
||||
bazel_target_cpu = "darwin",
|
||||
constraint_values = [
|
||||
|
|
Loading…
Reference in New Issue