Repository navigation
Conversation
Linux x86_64 and aarch64 builds now link through scripts/link-mold.sh. It is set as the Cargo linker in .cargo/config.toml, so an environment RUSTFLAGS (-D warnings, the target-cpu tiers) can't drop it. A build host without mold stops with an install hint instead of silently falling back to another linker. Debug and test builds use debug = "line-tables-only": panics and backtraces keep file:line, and the full variable debug info is dropped. Benchmark LB-1 (warm sccache, 32 jobs, median of 3): on arm64 the clean test build went from 64.3 s to 55.5 s with mold and to 51.0 s with line tables, and the relink from 62.0 s to 47.2 s. x86_64 already linked with rust-lld, so mold alone changes nothing there (40.0 s vs 42.2 s, within noise); line tables bring it to 33.5 s. The release (LTO) build time is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM
-fuse-ld=mold makes the compiler driver look for ld.mold, so check that name. Cargo finds .cargo/config.toml from its working directory only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9b04edaca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ! command -v ld.mold >/dev/null 2>&1; then | ||
| echo "error: RustyGet links Linux builds with mold, which is not installed." >&2 | ||
| echo " Debian/Ubuntu: sudo apt install mold Fedora: sudo dnf install mold" >&2 | ||
| echo " Arch: sudo pacman -S mold (see site/content/install.md)" >&2 | ||
| exit 1 |
There was a problem hiding this comment.
Install mold in Linux CI before making it mandatory
On Linux CI runners without ld.mold, this new guard terminates linking, but .github/workflows/build.yml still installs only build-essential pkg-config libssl-dev just python3 par2 before running cargo test. The required Linux x86_64 and arm64 build jobs therefore fail instead of testing the change. .github/workflows/nativeness.yml also omits mold before its Clippy invocation. Add the dependency to both workflows in the same change rather than leaving CI provisioning as a follow-up. This also conflicts with AGENTS.md's requirement that “A change must also build and pass on Linux.”
AGENTS.md reference: AGENTS.md:L65-L69
Useful? React with 👍 / 👎.
What
x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu) link with mold throughscripts/link-mold.sh, set as the Cargolinkerin a new root.cargo/config.toml.linker, notrustflags, because an environmentRUSTFLAGS(AGENTS.md's-D warnings,just build's-C target-cputiers) replaces config rustflags and would silently drop the choice.-fuse-ld=moldcomes last, so it overrides the-fuse-ld=lldrustc passes on x86_64.rust:1.100.0container with no mold:error: linking with /src/scripts/link-mold.sh failed ... RustyGet links Linux builds with mold, which is not installed.[profile.dev] debug = "line-tables-only"(the test profile inherits it). Panics, backtraces and gdbbtkeep function and file:line; variable debug info is dropped. No test reads symbolic backtraces.CARGO_PROFILE_DEV_DEBUG=truebrings full debug info back for a debugger session.moldis in the install requirements and apt line (site/content/install.md) and in thebuild-deb.shneeds list..gitignorenow keeps/.cargo/..github/workflows/build.ymlandnativeness.ymlmust addmoldto their apt installs in their apt installs. The push token lacks theworkflowscope, and Actions is unavailable anyway, so that edit is left for an owner with that scope.Benchmark LB-1 (warm sccache, 32 jobs, median of 3, every sample kept)
Hosts: rustyget-x86-b and rustyget-arm-b (Ubuntu 24.04, Rust 1.100.0, mold 2.30.0, lld 18.1.3). Steps:
cargo build --tests,RUSTFLAGS="-D warnings"rust/src/crc.rs, then rebuildcargo build --release --bin rustyget(fat LTO, x86target-cpu=x86-64-v3)What the numbers show:
Evidence:
~/rustyget-requests/linkbench/(bench.sh, samples.csv and logs per host, meta.txt).Validation
Linux (rg-farm, GitHub Actions unavailable):
(running on head d9b04ed; lines added when done)
macOS (m5air, platform config touched): (running on head d9b04ed)
Release deb (rg-farm, rustyget-x86-g, from deploy-6790 + this head): sha256
ce4df842149c433cceebc15245bdc49b6d4c2672f07ea8a9e593e0da7e375ec1.mold 2.30.0in.comment.libc6 (>= 2.39), libssl3t64, so it installs on Ubuntu 24.04 and 26.04.Farm hosts: I installed mold on rustyget-arm-b, avx2-4 and x86-b..h, and asked the fleet session to add it to provisioning.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LG44gYUGuwLMB2hw7HQGbM