Skip to content

[cxx-interop] Install CxxShim library for macCatalyst #76260

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
merged 1 commit into from
Sep 6, 2024

Conversation

egorzhdan
Copy link
Contributor

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

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
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Sep 4, 2024
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, thank you

@egorzhdan egorzhdan merged commit 0a14f04 into main Sep 6, 2024
5 checks passed
@egorzhdan egorzhdan deleted the egorzhdan/cxxshim-maccatalyst branch September 6, 2024 12:09
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants