Skip to content

Always use Xcode-provided Clang in macOS CI#152192

Open
madsmtm wants to merge 3 commits intorust-lang:mainfrom
madsmtm:remove-use-xcode-clang
Open

Always use Xcode-provided Clang in macOS CI#152192
madsmtm wants to merge 3 commits intorust-lang:mainfrom
madsmtm:remove-use-xcode-clang

Conversation

@madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Feb 5, 2026

Most of our macOS CI runners use the Xcode-provided Clang. dist-apple-various still downloads Clang from LLVM's prebuilt sources, which is a bit problematic, because we're still using the Xcode-provided headers.

As a concrete example, using Xcode's Clang is required by #152013, as otherwise updating to Xcode 26 headers fails with an obscure fatal error: 'net/route.h' file not found, see this build log. I suspect this is because building the new headers isn't officially supported with the older LLVM/Clang 15.

This PR removes that functionality, so that we instead always build with the Xcode-provided Clang. This is effectively the same as setting USE_XCODE_CLANG=1 on dist-apple-various as well, but I thought I'd clean things up while I'm at it.

I didn't find the reason why we did this in first place, maybe because the Xcode Clang at the time was too out of date to build LLVM? It doesn't seem to be a problem anymore though.

r? t-infra

Instead, always use the Xcode-provided Clang to build LLVM.
Bootstrap no longer infers the archiver as `clang-ar`, so we don't need
to set this explicitly.
Instead of manually setting up CC/CXX environment variables, use the
default configuration that Xcode gives us.
@madsmtm madsmtm added O-macos Operating system: macOS T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. A-CI Area: Our Github Actions CI labels Feb 5, 2026
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 5, 2026
@madsmtm madsmtm added the O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) label Feb 5, 2026
@madsmtm
Copy link
Contributor Author

madsmtm commented Feb 5, 2026

@bors try jobs=apple

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
Always use Xcode-provided Clang in macOS CI


try-job: *apple*
@madsmtm madsmtm mentioned this pull request Feb 5, 2026
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 6, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 6, 2026

💥 Test timed out after 21600s

@madsmtm
Copy link
Contributor Author

madsmtm commented Feb 6, 2026

@bors retry

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 6, 2026

❗ You can only retry pull requests that are approved and have a previously failed auto build.

@madsmtm
Copy link
Contributor Author

madsmtm commented Feb 6, 2026

Right, I wanted you to retry the try, not retry the merge ;)

@bors try jobs=apple

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 6, 2026
Always use Xcode-provided Clang in macOS CI


try-job: *apple*
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 6, 2026

☀️ Try build successful (CI)
Build commit: c4619b7 (c4619b7af1e6bb62315400fb998598d9d3012bb0, parent: a3ceeeb26c31eb15ace604890cef17d75a735ed2)

@madsmtm
Copy link
Contributor Author

madsmtm commented Feb 6, 2026

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-macos Operating system: macOS S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants