Repository navigation
Description
Follows #40 (Windows self-host, merged) — the macOS parallel. Part of #6 (self-host = strongest correctness signal).
Goal
Prove the macOS Mach-O bridge links reld itself with reld (self-host via ld64.lld) as a CI gate on the macos-arm64 leg. Extends coverage from the small rusqlite fixture (BR-3) to a large, real Rust binary (reld, ~17 MB).
Design — combine two proven patterns
- Windows self-host: link reld with reld-link (bridge) as a CI gate #40 Windows self-host: relink
reldwith the just-built reld linker by changingCARGO_TARGET_<triple>_LINKER, then runreld --versionand assertReld+ exit 0. - BR-3 macOS bridge e2e (feat(bridge): macOS Mach-O bridge via ld64.lld (BR-3) #31, passed first-try): on macOS, rustc must pass ld64-native argv to reld, via
CARGO_TARGET_AARCH64_APPLE_DARWIN_RUSTFLAGS="-Clinker-flavor=ld64.lld"alongsideCARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=<reld>.
Scope — .github/workflows/ci.yml only
Add a step to the macos-arm64 leg of phase1-native, after the "macOS native tests" step (which builds the workspace incl. the reld binary at target/debug/reld), shell: bash, set -euo pipefail:
reld="$GITHUB_WORKSPACE/target/debug/reld";test -x "$reld".export CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER="$reld"andexport CARGO_TARGET_AARCH64_APPLE_DARWIN_RUSTFLAGS="-Clinker-flavor=ld64.lld"(so the linker-env change forces a relink of reld through the Mach-O bridge → ld64.lld).$CARGO_COMMAND build -p reld --bin reld.out=$("$GITHUB_WORKSPACE/target/debug/reld" --version); assert exit 0 andgrep -q 'Reld'.
Do NOT modify other legs/steps. No source change.
Verification
- The relink-through-the-bridge +
reld --versionruns on the macos-arm64 CI runner (I can't run macOS locally; the Windows equivalent Windows self-host: link reld with reld-link (bridge) as a CI gate #40 and the macOS rusqlite bridge e2e BR-3 are both proven, so this combines two known-good patterns). - Note the linker-env change forces a real relink (empirically confirmed on Windows in Windows self-host: link reld with reld-link (bridge) as a CI gate #40) — not a cached no-op.
Out of scope
Two-generation self-host; the rustc-based macOS reld benchmark measurement.
Done when
The macos-arm64 CI leg relinks reld through ld64.lld and the self-linked reld --version runs green; other legs unchanged; PR merged, issue closed, branch rebased on origin/main.
Activity