Skip to content

Commit

Permalink
fix injection of -dynamiclib
Browse files Browse the repository at this point in the history
setuptools v72.2.0 introduces linker_so_cxx
  • Loading branch information
mdavidsaver committed Aug 15, 2024
1 parent 8b28347 commit 8f8517a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/setuptools_dso/dsocmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,11 @@ def run(self):

# fixup for MAC to build dylib (MH_DYLIB) instead of bundle (MH_BUNDLE)
if sys.platform == 'darwin':
for i,val in enumerate(self.compiler.linker_so):
if val=='-bundle':
self.compiler.linker_so[i] = '-dynamiclib'
for attr in ('linker_so', 'linker_so_cxx'):
linker_so = getattr(self.compiler, attr, [])
for i,val in enumerate(linker_so):
if val=='-bundle':
linker_so[i] = '-dynamiclib'

for dso in self.dsos:
self.build_dso(dso)
Expand Down

0 comments on commit 8f8517a

Please sign in to comment.