Closed
Description
Trying to compile rustc with codegen-units-std = 0
in config.toml
fails with the following error:
Updating only changed submodules
Submodules updated in 0.02 seconds
Finished dev [unoptimized] target(s) in 0.19s
Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `/home/zilbuz/dev/rustc/rust/build/bootstrap/debug/rustc - --crate-name ___ --print=file-names --target x86_64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro` (exit code: 1)
--- stderr
error: Value for codegen units must be a positive nonzero integer
command did not execute successfully: "/home/zilbuz/dev/rustc/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "8" "--release" "--features" "panic-unwind backtrace" "--manifest-path" "/home/zilbuz/dev/rustc/rust/src/libstd/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
failed to run: /home/zilbuz/dev/rustc/rust/build/bootstrap/debug/bootstrap build -i --stage 1 src/libstd
Build completed unsuccessfully in 0:00:01
The codegen-units-std
option isn't treated the same as the codegen-units
option in the bootstrap's config.rs
.
Is this intentional? Should I submit a PR to support codegen-units-std = 0
?
If this is intentional, then I think an error should be raised as soon as the option is read rather than having the generic "Value for codegen units must be a positive nonzero integer" later.