Skip to content

Commit 4e75872

Browse files
committed
rustbuild: Verify flags are configured
Building with `--target foo` should fail because that target wasn't actually validated.
1 parent c86e7c4 commit 4e75872

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/bootstrap/build/sanity.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,16 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
119119
}
120120
}
121121
}
122+
123+
for host in build.flags.host.iter() {
124+
if !build.config.host.contains(host) {
125+
panic!("specified host `{}` is not in the ./configure list", host);
126+
}
127+
}
128+
for target in build.flags.target.iter() {
129+
if !build.config.target.contains(target) {
130+
panic!("specified target `{}` is not in the ./configure list",
131+
target);
132+
}
133+
}
122134
}

0 commit comments

Comments
 (0)