Clarify the behavior of rust.codegen-backends

This commit is contained in:
Jakub Beránek 2025-08-01 17:48:53 +02:00
parent 929b3bb4c3
commit ca6e367e19
No known key found for this signature in database
GPG key ID: 909CD0D26483516B
5 changed files with 33 additions and 16 deletions

View file

@ -740,11 +740,19 @@
# result (broken, compiling, testing) into this JSON file.
#rust.save-toolstates = <none> (path)
# This is an array of the codegen backends that will be compiled for the rustc
# that's being compiled. The default is to only build the LLVM codegen backend,
# and currently the only standard options supported are `"llvm"`, `"cranelift"`
# and `"gcc"`. The first backend in this list will be used as default by rustc
# when no explicit backend is specified.
# This array serves three distinct purposes:
# - Backends in this list will be automatically compiled and included in the sysroot of each
# rustc compiled by bootstrap.
# - The first backend in this list will be configured as the **default codegen backend** by each
# rustc compiled by bootstrap. In other words, if the first backend is e.g. cranelift, then when
# we build a stage 1 rustc, it will by default compile Rust programs using the Cranelift backend.
# This also means that stage 2 rustc would get built by the Cranelift backend.
# - Running `x dist` (without additional arguments, or with `--include-default-paths`) will produce
# a dist component/tarball for the Cranelift backend if it is included in this array.
#
# Note that the LLVM codegen backend is special and will always be built and distributed.
#
# Currently, the only standard options supported here are `"llvm"`, `"cranelift"` and `"gcc"`.
#rust.codegen-backends = ["llvm"]
# Indicates whether LLD will be compiled and made available in the sysroot for rustc to execute, and