Skip to content

Commit b10cb26

Browse files
committed
Pass "-Wunused_extern_options" to stage1 compiler
1 parent 5fa5b9d commit b10cb26

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/bootstrap/bootstrap.py

+1
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ def build_bootstrap(self):
691691
target_linker = self.get_toml("linker", build_section)
692692
if target_linker is not None:
693693
env["RUSTFLAGS"] += " -C linker=" + target_linker
694+
# After the next cfg(bootstrap) bump, add "-Wunused_extern_options" to RUSTFLAGS
694695
env["RUSTFLAGS"] += " -Wrust_2018_idioms -Wunused_lifetimes"
695696
if self.get_toml("deny-warnings", "rust") != "false":
696697
env["RUSTFLAGS"] += " -Dwarnings"

src/bootstrap/builder.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,10 @@ impl<'a> Builder<'a> {
10671067
// some code doesn't go through this `rustc` wrapper.
10681068
rustflags.arg("-Wrust_2018_idioms");
10691069
rustflags.arg("-Wunused_lifetimes");
1070+
// Remove this after the next cfg(bootstrap) bump
1071+
if stage != 0 {
1072+
rustflags.arg("-Wunused_extern_options");
1073+
}
10701074

10711075
if self.config.deny_warnings {
10721076
rustflags.arg("-Dwarnings");

0 commit comments

Comments
 (0)