-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
rust/src/bootstrap/src/core/config/toml/rust.rs
Lines 576 to 592 in 2f2c8c3
if let Some(ref backends) = codegen_backends { | |
let available_backends = ["llvm", "cranelift", "gcc"]; | |
self.rust_codegen_backends = backends.iter().map(|s| { | |
if let Some(backend) = s.strip_prefix(CODEGEN_BACKEND_PREFIX) { | |
if available_backends.contains(&backend) { | |
panic!("Invalid value '{s}' for 'rust.codegen-backends'. Instead, please use '{backend}'."); | |
} else { | |
println!("HELP: '{s}' for 'rust.codegen-backends' might fail. \ | |
Codegen backends are mostly defined without the '{CODEGEN_BACKEND_PREFIX}' prefix. \ | |
In this case, it would be referred to as '{backend}'."); | |
} | |
} | |
s.clone() | |
}).collect(); | |
} |
If the value does not start with CODEGEN_BACKEND_PREFIX, it is just not validated at all.
So it means that typing gccc
instead of gcc
will cause no warning or error to be shown and gcc
backend not actually being enabled.
Same issue for target-specific codegen options.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)