forge
Explore
Log in

Don't you dare go Hollow

Link the deploy binary with the default rust-lld, not BFD

Browse files at this commit

c6d6abc86cf0d87261e4a1c73343ad688aa4f303Ahmet Kaan GümüşParent: 1666404
  • perf
    • link the deploy binary with the default rust-lld, not BFD
Show full message
⚡ perf(ci): link the deploy binary with the default rust-lld, not BFD

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.ymlmodified+9 -7
@@ -63,14 +63,16 @@ jobs:
6363 run: |
6464 set -euo pipefail
6565 # `topcoat asset bundle` runs its own `cargo build` and strips every
66- # CARGO_* variable from it, so neither the target nor its linker can
67- # be passed by environment. They go into the cargo config that inner
68- # build reads. This file is written in CI only; it is not committed.
66+ # CARGO_* variable from it, so the target cannot be passed by
67+ # environment; it goes into the cargo config that inner build reads.
68+ # This file is written in CI only; it is not committed.
6969 mkdir -p .cargo
70- {
71- printf '[build]\ntarget = "%s"\n\n' "$TARGET"
72- printf '[target.x86_64-unknown-linux-musl]\nlinker = "musl-gcc"\n'
73- } >> .cargo/config.toml
70+ printf '[build]\ntarget = "%s"\n' "$TARGET" >> .cargo/config.toml
71+ # The linker stays rustc's default (the bundled rust-lld): a warm
72+ # relink of this binary measured 142s under musl-gcc's BFD against
73+ # 23s under rust-lld, and that link was the largest single chunk of
74+ # the deploy build. musl-gcc remains the C compiler below — ring's
75+ # assembly needs it, and lld links the objects it produces.
7476 # C dependencies (ring, under lettre's TLS) compile against musl too.
7577 echo "CC_x86_64_unknown_linux_musl=musl-gcc" >> "$GITHUB_ENV"
7678