-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Build Cxx and CxxStdlib modules for macCatalyst #74994
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This enables building the C++ stdlib overlays (`Cxx.swiftmodule` and `CxxStdlib.swiftmodule`) for the Mac Catalyst target. rdar://126938813
@swift-ci please test |
DougGregor
approved these changes
Jul 5, 2024
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!
egorzhdan
added a commit
that referenced
this pull request
Sep 4, 2024
This is a follow-up after the change that enabled Cxx and CxxStdlib overlays on macCatalyst: #74994. The compiler relies on the presence of these shim libraries in the toolchain. rdar://135275773
drodriguez
added a commit
to drodriguez/swift
that referenced
this pull request
Sep 26, 2024
The existing code will use paths for "iphoneos" because the triples for macCatalyst are in the form "<arch>-apple-iosXX.yy-macabi", which the code interprets as an iPhone triple. This seems to work in Xcode because the "iphoneos" folder is always there. When building in open source, this seems to work because it is also normal to have the iPhone SDK configured. This is not the case if you want to build the macOS SDK in isolation. The code changes detect the macCatalyst environment from the triple and use the "macosx" paths instead, otherwise it follows the same code path as before. This matches many places in the CMakeLists.txt files in which macCatalyst support pieces are only enabled when the SDK is macOS. The modified function is also used for the libc modulemap of non-Darwin platforms, but for those triples, the macCatalyst environment should not be detected, so the libc modulemap should not be affected by this change. This is a followup to swiftlang#76260 and swiftlang#74994.
drodriguez
added a commit
that referenced
this pull request
Sep 27, 2024
…yst (#76735) The existing code will use paths for "iphoneos" because the triples for macCatalyst are in the form "<arch>-apple-iosXX.yy-macabi", which the code interprets as an iPhone triple. This seems to work in Xcode because the "iphoneos" folder is always there. When building in open source, this seems to work because it is also normal to have the iPhone SDK configured. This is not the case if you want to build the macOS SDK in isolation. The code changes detect the macCatalyst environment from the triple and use the "macosx" paths instead, otherwise it follows the same code path as before. This matches many places in the CMakeLists.txt files in which macCatalyst support pieces are only enabled when the SDK is macOS. The modified function is also used for the libc modulemap of non-Darwin platforms, but for those triples, the macCatalyst environment should not be detected, so the libc modulemap should not be affected by this change. This is a followup to #76260 and #74994.
drodriguez
added a commit
to drodriguez/swift
that referenced
this pull request
Sep 30, 2024
The existing CMake code for macCatalyst swiftmodule only handled the shared case, and did not have the static pieces that non-macCatalyst targets are doing. Try to match as much as possible the non-macCatalyst variables and structure and allow macCatalyst targets to support static Swift targets. This is important for the `Cxx.swiftmodule` and `CxxStdlib.swiftmodule`, since they are only static, and the previous code skipped creating those files since swiftlang#74994
drodriguez
added a commit
to drodriguez/swift
that referenced
this pull request
Oct 21, 2024
The existing CMake code for macCatalyst swiftmodule only handled the shared case, and did not have the static pieces that non-macCatalyst targets are doing. Try to match as much as possible the non-macCatalyst variables and structure and allow macCatalyst targets to support static Swift targets. This is important for the `Cxx.swiftmodule` and `CxxStdlib.swiftmodule`, since they are only static, and the previous code skipped creating those files since swiftlang#74994
drodriguez
added a commit
that referenced
this pull request
Oct 22, 2024
The existing CMake code for macCatalyst swiftmodule only handled the shared case, and did not have the static pieces that non-macCatalyst targets are doing. Try to match as much as possible the non-macCatalyst variables and structure and allow macCatalyst targets to support static Swift targets. This is important for the `Cxx.swiftmodule` and `CxxStdlib.swiftmodule`, since they are only static, and the previous code skipped creating those files since #74994
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This enables building the C++ stdlib overlays (
Cxx.swiftmodule
andCxxStdlib.swiftmodule
) for the Mac Catalyst target.rdar://126938813