Skip to content

[CMake] Cleaning up macOS symbol list #77566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

etcwilde
Copy link
Member

This patch set applies the appropriate fixes to ensure that the symbols exported from swiftCore.dylib match what is expected from the Apple builds, providing knobs to enable and disable the various features. I went through the list of relevant knobs that add_swift_target_library exposed and made them knobs for the swiftCore build instead, making it easier to enable and disable them depending on the goals of the vendor. I've also hidden the C/C++ symbols by default to ensure that we don't accidentally leak anything.

The Swift stdlib shouldn't be exposing C/C++ symbols by default.
There are select functions that should be exposed, like the
`_swift_allocObject` and the retain/release functions, but this should
be an explicit decision in the sources.
Making a more in-depth pass over the definition macros and flags in
SwiftSource.cmake _add_target_variant_swift_compile_flags.
These are only flags that actually matter for swiftCore though. This
does not include concurrency flags.
Hooks up the definition for back-deployment support and the missing
library name needed to get the magic symbols set up right.
@etcwilde
Copy link
Member Author

@swift-ci please smoke test

@etcwilde etcwilde merged commit af58e6e into swiftlang:main Nov 13, 2024
3 checks passed
@etcwilde etcwilde deleted the ewilde/stdlib-rebuild-all-the-defines branch November 13, 2024 06:05
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