-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Runtimes] lay down nested swift modules ahead of CMake 4.1 #82571
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
[Runtimes] lay down nested swift modules ahead of CMake 4.1 #82571
Conversation
target_compile_options(${target} PRIVATE | ||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-module-path ${variant_module_tmp_dir}/${target}.swiftmodule>") | ||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-module-path ${CMAKE_CURRENT_BINARY_DIR}/${module_name}.swiftmodule/${SwiftCore_VARIANT_MODULE_TRIPLE}.swiftmodule>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-module-path ${CMAKE_CURRENT_BINARY_DIR}/${module_name}.swiftmodule/${SwiftCore_VARIANT_MODULE_TRIPLE}.swiftmodule>") | |
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-emit-variant-module-path ${CMAKE_CURRENT_BINARY_DIR}/${module_name}.swiftmodule/${SwiftCore_VARIANT_MODULE_TRIPLE}.swiftmodule>") |
message(AUTHOR_WARNING [=[ | ||
This version of CMake supports the Swift module directory structure | ||
Please consider checking the implementation of `emit_swift_interface`` | ||
to ensure if behaves as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to ensure if behaves as expected | |
to ensure it behaves as expected |
aad3856
to
33f228a
Compare
@swift-ci please test |
DEPENDS ${target}) | ||
target_sources(${target} | ||
INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${module_name}.swiftmodule/${SwiftCore_MODULE_TRIPLE}.swiftmodule>) | ||
|
||
# Generate textual swift interfaces is library-evolution is enabled | ||
if(SwiftCore_ENABLE_LIBRARY_EVOLUTION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed in order to build target variants properly with a SwiftDriver that has swiftlang/swift-driver#1856 Addresses rdar://154410676
33f228a
to
07f9a31
Compare
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as far as I can tell. Should check with @compnerd as there may be associated changes needed in the swift-installer-scripts repo.
@swift-ci please smoke test macOS |
@swift-ci please test macOS |
@swift-ci please build toolchain Windows |
This is needed in order to build target variants properly with a SwiftDriver that has swiftlang/swift-driver#1856 Addresses rdar://154410676
… 4.1 This is needed in order to build target variants properly with a SwiftDriver that has swiftlang/swift-driver#1856 Addresses rdar://154410676
07f9a31
to
111cfe2
Compare
@swift-ci please smoke test macOS |
@swift-ci please test macOS |
@swift-ci please test Linux |
@swift-ci please build toolchain Windows |
@swift-ci please test Windows |
Trying to figure out a failure in swiftlang#82571 https://ci-external.swift.org/job/swift-PR-build-toolchain-windows/5941/
Still need to cross reference with the installer scripts, but looking at the logs for the build of the Windows toolchain and perusing some local build results, it seems that the installation of experimental products is generating the existing files at the same location, and adding @@ -1,11 +1,17 @@
-- Install configuration: "Release"
-- Installing: T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/libswift_RegexParser.lib
+-- Installing: T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_RegexParser.swiftmodule
-- Installing: T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_RegexParser.swiftmodule/x86_64-unknown-windows-msvc.swiftdoc
-- Installing: T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_RegexParser.swiftmodule/x86_64-unknown-windows-msvc.swiftmodule
+-- Installing: T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/_RegexParser.swiftmodule/x86_64-unknown-windows-msvc.swiftsourceinfo
-- Installing: T:/Program Files/Swift/Platforms/Windows.platform/Developer/SDKs/WindowsExperimental.sdk/usr/lib/swift_static/windows/x86_64/libswift_StringProcessing.lib |
All the phases that target for |
This is needed in order to build target variants properly with a SwiftDriver that has swiftlang/swift-driver#1856 enabled.
Addresses rdar://154410676