Skip to content

fix(cmake): Apply -undefined dynamic_lookup to all Apple platforms - #6075

Merged
rwgk merged 2 commits into
pybind:masterfrom
jjuang-apple:bugfix/all-apple-platforms
May 24, 2026
Merged

fix(cmake): Apply -undefined dynamic_lookup to all Apple platforms#6075
rwgk merged 2 commits into
pybind:masterfrom
jjuang-apple:bugfix/all-apple-platforms

Conversation

@jjuang-apple

@jjuang-apple jjuang-apple commented May 21, 2026

Copy link
Copy Markdown
Contributor

The -undefined dynamic_lookup flag is an Apple linker (ld64) feature, it works on all Apple platforms, not just macOS. Gating it behind $<PLATFORM_ID:Darwin> means it breaks for anyone cross-compiling Python extensions for iOS/tvOS/watchOS/visionOS.

Suggested changelog entry:

  • Apply -undefined dynamic_lookup to all Apple platforms.

@jjuang-apple
jjuang-apple requested a review from henryiii as a code owner May 21, 2026 21:45

@rwgk rwgk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rwgk
rwgk merged commit a2592ad into pybind:master May 24, 2026
152 of 154 checks passed
@github-actions github-actions Bot added the needs changelog Possibly needs a changelog entry label May 24, 2026
@henryiii henryiii changed the title Apply -undefined dynamic_lookup to all Apple platforms fix(cmake): Apply -undefined dynamic_lookup to all Apple platforms Jul 25, 2026
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants