Skip to content

macOS self-host: link reld with reld (ld64.lld bridge) as a CI gate #43

Closed

Description

@zackees

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

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" and export 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 and grep -q 'Reld'.

Do NOT modify other legs/steps. No source change.

Verification

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

  1. added
    enhancement
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions