Skip to content

bazel: Configure LLVM toolchain#3204

Merged
mgeisler merged 1 commit into
mainfrom
bazel-llvm-toolchain
Jun 11, 2026
Merged

bazel: Configure LLVM toolchain#3204
mgeisler merged 1 commit into
mainfrom
bazel-llvm-toolchain

Conversation

@mgeisler

Copy link
Copy Markdown
Collaborator

I noticed warnings when compiling Rust code both locally and in GitHub CI:

INFO: From Compiling Rust bin mdbook-exerciser (1 file):
warning: the gold linker is deprecated and has known bugs with Rust
|
= help: consider using LLD or ld from GNU binutils instead

From what I understands, this is because we haven't configured any C/C++ toolchain for Bazel and it thus picks up what is on the CI runner image.

Configuring toolchains_llvm fixes the warnings and ensures a hermetic build.

@mgeisler

Copy link
Copy Markdown
Collaborator Author

I'm curious how long it will take to download and configure this on the first build (and if subsequent builds are faster due to the cache). We're talking 10+ GB of unpacked data.

@mgeisler

Copy link
Copy Markdown
Collaborator Author

Hmm... this was suspiciously fast... on my laptop, it took a small eternity to download and unpack the LLVM toolchain and then recompile everything.

@mgeisler

Copy link
Copy Markdown
Collaborator Author

I tried clearing the caches and trigger a build again — it recompiled everything and so I believe this is working as intended (it's just faster than I had expected).

@mgeisler mgeisler marked this pull request as ready for review June 10, 2026 15:57
@mgeisler mgeisler requested review from gribozavr and qwandor June 10, 2026 15:57
@mgeisler mgeisler force-pushed the bazel-llvm-toolchain branch from 0a86045 to 081d2fa Compare June 10, 2026 16:14
@mgeisler mgeisler enabled auto-merge (squash) June 10, 2026 16:15
I noticed warnings when compiling Rust code both locally and in GitHub
CI:

> INFO: From Compiling Rust bin mdbook-exerciser (1 file):
> warning: the gold linker is deprecated and has known bugs with Rust
>  |
>  = help: consider using LLD or ld from GNU binutils instead

From what I understand, this is because we haven't configured any
C/C++ toolchain for Bazel and it thus picks up what is on the CI
runner image.

Configuring `toolchains_llvm` fixes the warnings and ensures a
hermetic build.
@mgeisler mgeisler force-pushed the bazel-llvm-toolchain branch from 081d2fa to d6f41dd Compare June 11, 2026 10:26
@mgeisler mgeisler merged commit 90e9146 into main Jun 11, 2026
45 checks passed
@mgeisler mgeisler deleted the bazel-llvm-toolchain branch June 11, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants