Skip to content

Draft: macos crossplatform build with rosetta 2#6246

Draft
MaxRayskiy wants to merge 2 commits into
masterfrom
feature/macos-crossplatform-rosetta
Draft

Draft: macos crossplatform build with rosetta 2#6246
MaxRayskiy wants to merge 2 commits into
masterfrom
feature/macos-crossplatform-rosetta

Conversation

@MaxRayskiy

Copy link
Copy Markdown
Contributor

No description provided.

MaxRayskiy and others added 2 commits June 11, 2026 22:42
…l Homebrew

Add an `x64-cross` matrix entry to build-test-macos.yml that builds the
Intel (x86_64) target on the self-hosted arm64 fleet, ALONGSIDE the
GitHub-hosted macos-15-intel job for validation (distinct cache instance;
its x64-cross artifacts are kept separate and not consumed downstream yet).

The approach reproduces an Intel mac via Rosetta 2 and a parallel x86_64
Homebrew at /usr/local: putting /usr/local first on PATH makes brew, cmake,
ninja, python, pkg-config, make and grep all resolve to x86_64; an x86_64
cmake reports CMAKE_SYSTEM_PROCESSOR=x86_64 (so thirdparty SIMD code paths
are selected correctly) and its child compilers inherit the x86_64 slice;
the x86_64 Homebrew installs x86_64 bottles. No `arch -x86_64` wrapping or
thirdparty-submodule patching is needed.

- build_source.sh / build_thirdparty.sh: honor CMAKE_OSX_ARCHITECTURES
  (cross-arch guardrail) and a caller-set NPROC (cap build parallelism);
  both are no-ops when unset, so native builds are unaffected.

Validated end-to-end on an Apple M4: thirdparty + MeshLib core + mrbind +
python bindings all build as x86_64, 294/294 unit tests pass under Rosetta,
and mrmeshpy.so imports under x86_64 python.

Runner prerequisite: Rosetta 2 + an x86_64 Homebrew bootstrapped at
/usr/local (formulae are installed by the workflow).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Documents the Rosetta 2 + /usr/local x86_64 Homebrew approach, what the
workflow/script changes add, the one-time runner prerequisite (Rosetta +
x86_64 Homebrew bootstrap), a local-reproduction recipe, and validation
status.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant