-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CMake] Copy legacy layouts for module architectures #34921
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] Copy legacy layouts for module architectures #34921
Conversation
This supports properly the new dependencies introduced with swiftlang#34846. Addresses rdar://71851272
@swift-ci please test |
@swift-ci please build toolchain |
Linux Toolchain (Ubuntu 16.04) Install command |
macOS Toolchain Install command |
@@ -1,7 +1,7 @@ | |||
add_custom_target("copy-legacy-layouts" ALL) | |||
|
|||
foreach(sdk ${SWIFT_SDKS}) | |||
foreach(arch ${SWIFT_SDK_${sdk}_ARCHITECTURES}) | |||
foreach(arch ${SWIFT_SDK_${sdk}_ARCHITECTURES} ${SWIFT_SDK_${sdk}_MODULE_ARCHITECTURES}) |
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.
If these are overlapping this might run an architecture multiple times, correct?
Is this fine because this is only copying files & adding targets that copy?
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.
There should be no overlapping architecture, since we check for duplicates in ${SWIFT_SDK_${sdk}_MODULE_ARCHITECTURES}
when including SwiftConfigureSDK.cmake
in the main CMakeLists.txt
https://github.com/apple/swift/blob/main/cmake/modules/SwiftConfigureSDK.cmake#L212
(list_subtract
is defined at https://github.com/apple/swift/blob/main/cmake/modules/SwiftList.cmake#L3)
If that were not the case, we would need to filter duplicates, otherwise CMake would throw an error when adding a target with the same name as an existing one (at least in my experience).
* 'main' of github.com:apple/swift: [CMake] Copy legacy layouts for module architectures (swiftlang#34921)
This supports properly the new dependencies introduced with #34846.
Addresses rdar://71851272