Skip to content

Commit

Permalink
Remove use of -undefined dynamic_lookup on darwin
Browse files Browse the repository at this point in the history
This flag ignores undefined symbols at link time and forces them to be
looked up dynamically. This is incompatible with the newer fixup chains
macho format and theoretically shouldn't be necessary assuming your
dependencies are well defined.

Done in bazel's toolchain here bazelbuild/bazel#16414
  • Loading branch information
keith committed Feb 14, 2023
1 parent 069ee4e commit cf35a76
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions toolchain/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,6 @@ def cc_toolchain_config(
use_lld = False
link_flags.extend([
"-headerpad_max_install_names",
# This will issue a warning on macOS ventura; see:
# https://github.com/python/cpython/issues/97524
# https://developer.apple.com/forums/thread/719961
"-undefined",
"dynamic_lookup",
])
else:
# Note that for xcompiling from darwin to linux, the native ld64 is
Expand Down

0 comments on commit cf35a76

Please sign in to comment.