Skip to content

Don't pass foundation build path to swift-driver/swift-package-manager #74217

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

jmschonfeld
Copy link
Contributor

Both the swift-driver and swift-package-manager get the Foundation cmake build dir from the build script and pass it along to the Yams build. However, in the case where Foundation has been built via cmake, the Yams build ends up seeing duplicate modules in its search paths - one in the cmake build folder (search path added via the cmake target) and one in the installed toolchain directory (search path added implicitly by the compiler). This results in build failures due to the duplicate clang modules. Previously this was not an issue because all clang modules built by Foundation were private dependencies in cmake, but with the swift-foundation recore we need to make these public dependencies in the cmake graph because we are using internal import and not @_implementationOnly import (since library evolution is not enabled).

This should not affect behavior - in all of the cases where Foundation had been built via cmake, Foundation is also already installed into the toolchain and is still in the provided search paths.

@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@jmschonfeld
Copy link
Contributor Author

@swift-ci please build toolchain Linux platform

@jmschonfeld jmschonfeld merged commit 1407980 into swiftlang:main Jun 10, 2024
6 checks passed
@jmschonfeld jmschonfeld deleted the remove-foundation-dir-from-yams branch June 12, 2024 18:38
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