Skip to content

Install nested Swift modules #875

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
merged 2 commits into from
May 20, 2025
Merged

Install nested Swift modules #875

merged 2 commits into from
May 20, 2025

Conversation

etcwilde
Copy link
Contributor

Migrating to using the nested swiftmodule structure. This avoids needing to compute the architecture in the CMake script, using the compiler to tell us what the triple should be, making the build more robust. This also means that we can drop the architecture-specific subdirectory and install the dispatch modules alongside the swiftmodules for the other projects.

Note: We will need changes to the Windows installer scripts to reflect the new layout.

Migrating to using the nested swiftmodule structure. This avoids needing
to compute the architecture in the CMake script, using the compiler to
tell us what the triple should be, making the build more robust. This
also means that we can drop the architecture-specific subdirectory and
install the dispatch modules alongside the swiftmodules for the other
projects.
@etcwilde etcwilde requested a review from compnerd May 16, 2025 20:40
@etcwilde
Copy link
Contributor Author

@swift-ci please test

Support for Swift is only needed when we have Swift enabled. We don't
need to include the module when it isn't available. With the change to
query the Swift compiler for the module triple, we need the Swift
language to be enabled to set the swift module triple.

Since the include was pulled from the main CMakeLists file, it's prudent
to set the include guard to prevent accidentally loading the module
multiple times.
@etcwilde
Copy link
Contributor Author

@swift-ci please test

@etcwilde
Copy link
Contributor Author

Known unrelated test failure:

[2025-05-17T00:33:04.046Z] Failed Tests (1):
[2025-05-17T00:33:04.046Z]   swift-package-tests :: swift-package-init-lib.md

@etcwilde
Copy link
Contributor Author

@swift-ci please test

@etcwilde etcwilde merged commit beb137b into main May 20, 2025
2 checks passed
@compnerd compnerd deleted the ewilde/module-triple-modules branch May 20, 2025 18:22
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