Skip to content

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

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Mar 12, 2025

@swift-ci Please test Windows

@rintaro rintaro merged commit b66e024 into swiftlang:main Mar 17, 2025
25 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.

2 participants