Skip to content

Commit f4bd4b1

Browse files
committed
Avoid passing empty string to rustflags
1 parent 733074a commit f4bd4b1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,13 @@ impl Builder<'_> {
683683
rustflags.arg("--cfg=windows_raw_dylib");
684684
}
685685

686-
rustflags.arg(match use_new_symbol_mangling {
687-
Some(true) => "-Csymbol-mangling-version=v0",
688-
Some(false) => "-Csymbol-mangling-version=legacy",
689-
None => "",
690-
});
686+
if let Some(usm) = use_new_symbol_mangling {
687+
rustflags.arg(if usm {
688+
"-Csymbol-mangling-version=v0"
689+
} else {
690+
"-Csymbol-mangling-version=legacy"
691+
});
692+
}
691693

692694
// Always enable move/copy annotations for profiler visibility (non-stage0 only).
693695
// Note that -Zannotate-moves is only effective with debugging info enabled.

0 commit comments

Comments
 (0)