From c6d6abc86cf0d87261e4a1c73343ad688aa4f303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 31 Aug 2026 07:13:31 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20perf(ci):=20link=20the=20deploy=20b?= =?UTF-8?q?inary=20with=20the=20default=20rust-lld,=20not=20BFD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The workflow pinned musl-gcc as the musl linker, putting the final link on GNU bfd. A warm relink of this binary measures 142s under BFD against 23s under rust-lld — the link was the largest single chunk of the ~6 minute deploy build. musl-gcc stays as the C compiler for ring; lld links its objects. --- .github/workflows/main.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5be217c..7c60d06 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,14 +63,16 @@ jobs: run: | set -euo pipefail # `topcoat asset bundle` runs its own `cargo build` and strips every - # CARGO_* variable from it, so neither the target nor its linker can - # be passed by environment. They go into the cargo config that inner - # build reads. This file is written in CI only; it is not committed. + # CARGO_* variable from it, so the target cannot be passed by + # environment; it goes into the cargo config that inner build reads. + # This file is written in CI only; it is not committed. mkdir -p .cargo - { - printf '[build]\ntarget = "%s"\n\n' "$TARGET" - printf '[target.x86_64-unknown-linux-musl]\nlinker = "musl-gcc"\n' - } >> .cargo/config.toml + printf '[build]\ntarget = "%s"\n' "$TARGET" >> .cargo/config.toml + # The linker stays rustc's default (the bundled rust-lld): a warm + # relink of this binary measured 142s under musl-gcc's BFD against + # 23s under rust-lld, and that link was the largest single chunk of + # the deploy build. musl-gcc remains the C compiler below — ring's + # assembly needs it, and lld links the objects it produces. # C dependencies (ring, under lettre's TLS) compile against musl too. echo "CC_x86_64_unknown_linux_musl=musl-gcc" >> "$GITHUB_ENV"