Skip to content

Commit ec39809

Browse files
committed
Fix run --dep
1 parent 45d93ac commit ec39809

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

miri-script/src/commands.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,13 @@ impl Command {
503503
// More flags that we will pass before `flags`
504504
// (because `flags` may contain `--`).
505505
let mut early_flags = Vec::<OsString>::new();
506-
if let Some(target) = &target {
507-
early_flags.push("--target".into());
508-
early_flags.push(target.into());
506+
507+
// In `dep` mode, the target is already passed via `MIRI_TEST_TARGET`
508+
if !dep {
509+
if let Some(target) = &target {
510+
early_flags.push("--target".into());
511+
early_flags.push(target.into());
512+
}
509513
}
510514
early_flags.push("--edition".into());
511515
early_flags.push(edition.as_deref().unwrap_or("2021").into());

tests/ui.rs

+1
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ fn run_dep_mode(target: String, args: impl Iterator<Item = OsString>) -> Result<
337337

338338
let build_manager = BuildManager::one_off(config);
339339
let mut cmd = test_config.config.program.build(&test_config.config.out_dir);
340+
cmd.arg("--target").arg(test_config.config.target.as_ref().unwrap());
340341
// Build dependencies
341342
test_config.apply_custom(&mut cmd, &build_manager).unwrap();
342343

0 commit comments

Comments
 (0)