Skip to content

[5.9] Don't build and install libcxx when generating a macOS toolchain #64689

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 Mar 28, 2023

Libcxx is already part of the macOS SDKs shipped since Xcode 12.5, so there is no need for us to rebuild it.
This will also prevent compilation issues in the presets that builds the standard library using a prebuilt toolchain, so the clang compiler that ships in that toolchain does not pickup libcxx headers that do not match the tbd shipped in the underlying macOS SDK.

This change would be desirable for all macOS presets, focusing for now on the toolchain presets.

Addresses rdar://106817494

(cherry picked from commit 310082b, #64687)

Libcxx is already part of the macOS SDKs shipped since Xcode 12.5, so
there is no need for us to rebuild it.
This will also prevent compilation issues in the presets that builds the
standard library using a prebuilt toolchain, so the clang compiler that
ships in that toolchain does not pickup libcxx headers that do not
match the tbd shipped in the underlying macOS SDK.

This change would be desirable for all macOS presets, focusing for now
on the toolchain presets.

Addresses rdar://106817494

(cherry picked from commit 310082b, swiftlang#64687)
@edymtt edymtt requested a review from a team as a code owner March 28, 2023 20:25
@edymtt
Copy link
Contributor Author

edymtt commented Mar 28, 2023

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Mar 28, 2023

@swift-ci please build toolchain

@ldionne
Copy link

ldionne commented Mar 28, 2023

This makes sense to me in principle. We recommend not trying to build libc++ on Apple platforms and using the system/SDK provided one unless you are trying to bootstrap a SDK or C++ toolchain yourself, which isn’t the case here. It’s basically like libc — we don’t build libc from scratch, we use the one from the system.

So this LGTM, however I am not familiar with the Swift setup so my review of the changes themselves has limited value.

@shahmishal shahmishal merged commit 396b537 into swiftlang:release/5.9 Mar 31, 2023
@edymtt edymtt deleted the no-libcxx-in-macos-toolchain-5.9 branch March 31, 2023 14:12
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants