github: use faster linkers in CI

This shaves off something like 20 to 40 seconds for Linux. It’s
seemingly within the margin of error for Windows, so not sure if
we’ll want to keep it there.
This commit is contained in:
Emily 2025-03-16 17:08:08 +00:00
parent 5d48339165
commit 3ad42b8f15
2 changed files with 12 additions and 1 deletions

View File

@ -2,8 +2,15 @@
debug = "none"
incremental = false
[target.x86_64-unknown-linux-gnu]
rustflags = ["-Clink-arg=-fuse-ld=mold"]
[target.aarch64-unknown-linux-gnu]
rustflags = ["-Clink-arg=-fuse-ld=mold"]
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
# NOTE: on Windows, build with the static CRT, so that produced .exe files don't
# depend on vcruntime140.dll; otherwise the user requires visual studio if they
# download a raw .exe
[target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]

View File

@ -80,6 +80,10 @@ jobs:
- uses: taiki-e/install-action@0f58b6a196e0d71c72fd459ab8fd8b228f85f669
with:
tool: nextest,taplo-cli
- name: Install mold
uses: rui314/setup-mold@f80524ca6eeaa76759b57fb78ddce5d87a20c720
with:
make-default: false
- name: Build
run: >-
cargo build