Skip to content

Commit 5e32540

Browse files
committed
compiletest: require host/target flags specified
Instead of allowing them to be missing and using some placeholder "(none)" value instead.
1 parent 6c1c610 commit 5e32540

File tree

1 file changed

+4
-2
lines changed
  • src/tools/compiletest/src

1 file changed

+4
-2
lines changed

src/tools/compiletest/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ fn parse_config(args: Vec<String>) -> Config {
255255
}
256256
}
257257

258-
let target = opt_str2(matches.opt_str("target"));
258+
let host = matches.opt_str("host").expect("`--host` must be unconditionally specified");
259+
let target = matches.opt_str("target").expect("`--target` must be unconditionally specified");
260+
259261
let android_cross_path = matches.opt_str("android-cross-path").map(Utf8PathBuf::from);
260262
// FIXME: `cdb_version` is *derived* from cdb, but it's *not* technically a config!
261263
let cdb = debuggers::discover_cdb(matches.opt_str("cdb"), &target);
@@ -433,7 +435,7 @@ fn parse_config(args: Vec<String>) -> Config {
433435
optimize_tests: matches.opt_present("optimize-tests"),
434436
rust_randomized_layout: matches.opt_present("rust-randomized-layout"),
435437
target,
436-
host: opt_str2(matches.opt_str("host")),
438+
host,
437439
cdb,
438440
cdb_version,
439441
gdb,

0 commit comments

Comments
 (0)