Skip to content

Commit 465c487

Browse files
committed
Try to restore -Wl,-ld_classic
1 parent b7ca838 commit 465c487

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,17 @@ def awscrt_ext():
593593
if not is_macos_universal2():
594594
if sys.platform == 'darwin':
595595
extra_link_args += ['-Wl,-fatal_warnings']
596+
# xcode 15 introduced a new linker that generates a warning
597+
# when it sees duplicate libs or rpath during bundling.
598+
# pyenv installed from homebrew put duplicate rpath entries
599+
# into sysconfig, and setuptools happily passes them along
600+
# to xcode, resulting in a warning
601+
# (which is fatal in this branch).
602+
# ex. https://github.com/pyenv/pyenv/issues/2890
603+
# lets revert back to old linker on xcode >= 15 until one of
604+
# the involved parties fixes the issue.
605+
if get_xcode_major_version() >= 15:
606+
extra_link_args += ['-Wl,-ld_classic']
596607
elif 'bsd' in sys.platform:
597608
extra_link_args += ['-Wl,-fatal-warnings']
598609
else:

0 commit comments

Comments
 (0)