Skip to content

[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

Merged

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Dec 2, 2020

This supports properly the new dependencies introduced with #34846.

Addresses rdar://71851272

This supports properly the new dependencies introduced with swiftlang#34846.

Addresses rdar://71851272
@edymtt
Copy link
Contributor Author

edymtt commented Dec 2, 2020

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Dec 2, 2020

@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

swift-ci commented Dec 2, 2020

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 78fb1ec

Install command
tar zxf swift-PR-34921-512-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

swift-ci commented Dec 2, 2020

macOS Toolchain
Download Toolchain
Git Sha - 78fb1ec

Install command
tar -zxf swift-PR-34921-800-osx.tar.gz --directory ~/

@edymtt edymtt merged commit 3211817 into swiftlang:main Dec 2, 2020
@edymtt edymtt deleted the generate-legacy-layours-for-module-archs branch December 2, 2020 21:12
@@ -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})
Copy link
Contributor

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?

Copy link
Contributor Author

@edymtt edymtt Dec 2, 2020

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).

ainu-bot added a commit to google/swift that referenced this pull request Dec 2, 2020
* 'main' of github.com:apple/swift:
  [CMake] Copy legacy layouts for module architectures (swiftlang#34921)
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.

4 participants