Skip to content

Windows self-host: link reld with reld-link (bridge) as a CI gate #40

Closed

Description

@zackees

Part of #6 / #17 M4 — self-host is "the strongest single correctness signal available" (per the meta plan). Extends the Windows CI coverage from BR-2 (a small rusqlite fixture) to a large, real Rust binary: reld itself.

Goal

Prove the Windows COFF bridge links reld with reld-link (self-host via the bridge) as a CI gate. reld is a ~17 MB binary pulling in mimalloc, object, clap, and many crates — a far more demanding link than the rusqlite fixture, and a real-world self-host signal.

Verified locally (de-risked)

On x86_64-pc-windows-msvc: with CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER=<built reld-link.exe>, cargo build -p reld --bin reld relinks reld.exe via the bridge (reld-link → lld-link), and the self-linked binary runs: reld --version → Reld <sha> (compatible with GNU linkers), exit 0.

Scope — .github/workflows/ci.yml only

Add a step to the windows-msvc leg of phase1-native, after the existing bridge e2e / bench-smoke steps (so target/debug/reld-link.exe is built):

  • Set CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER to the just-built reld-link.exe.
  • cargo build -p reld --bin reld (forces a relink of reld.exe through the bridge, since the linker changed).
  • Run the self-linked reld --version; assert exit 0 and that the output contains Reld.
  • set-equivalent loud failure (pwsh: check $LASTEXITCODE, throw on non-zero).

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

Out of scope

macOS self-host (a follow-up, mirroring this on the macos leg via ld64.lld), and a full two-generation self-host (reld links reld links reld) — this issue is the first-generation Windows self-host gate.

Done when

The windows-msvc CI leg builds reld with reld-link and runs the self-linked binary green; other legs unchanged; PR merged, issue closed, branch rebased on origin/main.

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