-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-driverArea: rustc_driver that ties everything together into the `rustc` compilerArea: rustc_driver that ties everything together into the `rustc` compiler
Description
I'm trying to pass multiple -C target-feature
conditionally downstream. However, despite +/- for adding/removing a feature it appears only the last value takes effect.
$ cat >a.rs
fn main() {
if cfg!(target_feature="avx2") {
println!("AVX2 available");
}
if cfg!(target_feature="fma") {
println!("FMA available");
}
}
$ rustc a.rs -C target-feature=+avx2 -C target-feature=+fma
$ ./a
FMA available
$ rustc a.rs -C target-feature=+avx2,+fma
$ ./a
AVX2 available
FMA available
Metadata
Metadata
Assignees
Labels
A-driverArea: rustc_driver that ties everything together into the `rustc` compilerArea: rustc_driver that ties everything together into the `rustc` compiler