Skip to content

Commit

Permalink
Fix run --dep
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Sep 16, 2024
1 parent ef2ec1e commit a137efb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions miri-script/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,13 @@ impl Command {
// More flags that we will pass before `flags`
// (because `flags` may contain `--`).
let mut early_flags = Vec::<OsString>::new();
if let Some(target) = &target {
early_flags.push("--target".into());
early_flags.push(target.into());

// The target is already passed via `MIRI_TEST_TARGET`
if !dep {
if let Some(target) = &target {
early_flags.push("--target".into());
early_flags.push(target.into());
}
}
early_flags.push("--edition".into());
early_flags.push(edition.as_deref().unwrap_or("2021").into());
Expand Down
1 change: 1 addition & 0 deletions tests/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ fn run_dep_mode(target: String, args: impl Iterator<Item = OsString>) -> Result<

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

Expand Down

0 comments on commit a137efb

Please sign in to comment.