Skip to content

BR-4a: reld participates in the benchmark — reld-bench measures the reld driver shim #23

Closed

Description

@zackees

Sub-task of #17 (a focused slice of phase BR-4). Follows BR-1 (#20) and BR-2 (#22).

Goal

Make reld produce a real measurement in reld-bench instead of the hardcoded n/a, so it participates in the published benchmark. This is the user-facing north-star: "reld generates a graph and participates in the benchmark."

Where reld is measurable

reld is a native ELF linker on Linux (inherited from wild), invoked via clang -fuse-ld=<ld.reld>. ci/install-driver-shims.sh already produces the ld.reld / ld64.reld shims next to the reld binary. The published benchmark runs on Linux, so a real reld number lands there. On Windows/macOS reld links via a subprocess bridge (reld-link → lld) driven by rustc -Clinker, not clang -fuse-ld; there reld stays n/a in this clang-based harness (honest — a separate bench path is future work, not this issue).

Scope (this issue)

crates/reld-testkit/src/bin/reld-bench.rs only:

  • Discover the reld driver shim: --reld <path> override, else auto-discover ld.reld[.exe] next to the running reld-bench executable (std::env::current_exe() → parent).
  • When found, measure reld like any other linker (-fuse-ld=<abs path to ld.reld>, same probe + median-of-trials path), and print the real seconds in the reld column.
  • When not found or the probe link fails, keep n/a AND emit the existing-style <!-- linker reld not available ... --> comment so the gap is visible, not implied (matches the file's honesty note).
  • Remove the hardcoded println!(" n/a |"); the reld column is computed like the others.
  • A unit test for shim discovery / the availability decision.

Out of scope (future BR-4b)

SCHEMA_VERSION=2 + mode/engine/target fields in benchmark_stats.py, the 3-OS workflow matrix, per-OS competitor sets, and a Windows/macOS rustc-based reld bench path. Keep this PR to the bench binary.

Done when

reld-bench measures reld via the discovered shim (real number on Linux; graceful n/a elsewhere) with the hardcoded n/a gone; unit test passes; existing benchmark table contract with ci/benchmark_stats.py is unchanged (same columns/format). 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