Skip to content

Target Intel Clang under Rosetta - #23723

Merged
MikeMcQuaid merged 1 commit into
mainfrom
rosetta-clang-target
Sep 1, 2026
Merged

Target Intel Clang under Rosetta#23723
MikeMcQuaid merged 1 commit into
mainfrom
rosetta-clang-target

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Apple Clang on macOS 26 can select its native arm64 target even while Intel Homebrew runs under Rosetta 2. Superenv then combines that target with -march=westmere, which Clang rejects.
  • Detect the translated process using Homebrew's logical and physical processor values.
  • Pass -arch x86_64 only to Apple clang and clang++, leaving native ARM builds and alternative compilers unchanged.
  • Cover the failing flag combination with a shim regression test.
  • Users must still invoke Intel Homebrew with arch -x86_64.

Fixes #23722


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Codex with GPT 5.6-sol at Extra High effort, with local review and testing.


Copilot AI balanced review requested due to automatic review settings September 1, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

- Apple Clang on macOS 26 can select its native arm64 target even while
  Intel Homebrew runs under Rosetta 2. Superenv then combines that
  target with `-march=westmere`, which Clang rejects.
- Detect the translated process using Homebrew's logical and physical
  processor values.
- Pass `-arch x86_64` only to Apple `clang` and `clang++`, leaving
  native ARM builds and alternative compilers unchanged.
- Cover the failing flag combination with a shim regression test.
- Users must still invoke Intel Homebrew with `arch -x86_64`.

Fixes #23722

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@krehel

krehel commented Sep 1, 2026

Copy link
Copy Markdown
Member

Thanks!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 28236b8 Sep 1, 2026
59 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the rosetta-clang-target branch September 1, 2026 14:13
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.

Intel Homebrew under Rosetta on Apple Silicon: Superenv passes -march=westmere to arm64-targeting clang on macOS 26

3 participants