Skip to content
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

[CMake] '-no-emit-module-separately-wmo' for swift modules #79918

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Mar 11, 2025

Emitting modules in separate frontend job doesn't give any benefits because single add_library is just a single job from CMake's point of view. Clients need to wait for .dylib/.so being emitted before using the .swiftmodule. Not emitting modules separately is actually faster in CMake because it doesn't parse and typecheck the source code twice.

Emitting modules in separate frontend job doesn't give any benefits
because single add_library is just a single job from CMake's point of
view. Clients need to wait for `.dylib`/`.so` being emitted before using
the `.swiftmodule`. *Not* emitting modules separately is actually faster
in CMake because it doesn't parse and typecheck the source code twice.
@rintaro
Copy link
Member Author

rintaro commented Mar 11, 2025

swiftlang/swift-syntax#3012
@swift-ci Please smoke test

@rintaro rintaro requested review from xymus and etcwilde March 11, 2025 20:37
@rintaro
Copy link
Member Author

rintaro commented Mar 11, 2025

@swift-ci Please test Linux

@rintaro rintaro merged commit 90340a0 into swiftlang:main Mar 17, 2025
4 checks passed
@rintaro rintaro deleted the cmake-no-emit-module-separately branch March 17, 2025 18:41
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.

1 participant