bazel: use built-in rust-lld#3219
Closed
mgeisler wants to merge 1 commit into
Closed
Conversation
This removes the huge LLVM toolchain and instead instructs Rust to use its built-in linker.
Collaborator
Author
|
This is an alternative to #3216 — I tested it locally, and it unfortunately doesn't work out of the box since the built-in linker cannot find the libraries linked against. I wonder if this has something to do with a "sysroot"? The error I get: |
mgeisler
added a commit
that referenced
this pull request
Jun 23, 2026
This reverts #3204 due to repeated build failures in CI. The LLVM toolchain is huge, taking up 11 GB in the Bazel repository cache: ``` % cd $(bazel info repository_cache)/contents/f7d96c1d09ac1778314f1a73179da702edd9e75e8ef9231c06fa7ef6229cf47d % du -hs . 11G . ``` This is way too large for the GitHub CI runners, which are [documentated to have 14 GB of free disk space](https://docs.github.com/en/actions/reference/runners/github-hosted-runners). The result is seemingly random build failures where we run out of disk space. See [run 27773830289](https://github.com/google/comprehensive-rust/actions/runs/27773830289) which had several failed translation builds. The result of this is that we fall back on non-hermetic builds for the time being. This is the status quo from before adopting Bazel. We should look for another way to fix the > warning: the gold linker is deprecated and has known bugs with Rust warnigns. Perhaps more targeted by uninstalling `gold` and making sure another linker is picked up in CI? Universally instructing `rustc` to use `rust-lld` does not work (#3219) and using the small `hermetic_cc_toolchain` (Zig-based) also failed (#3216).
Collaborator
Author
|
Closing this for now as we have #3221 merged. Perhaps we can revisit it later and make it work with some tweaks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This removes the huge LLVM toolchain and instead instructs Rust to use its built-in linker.