Skip to content

Commit a1d14f0

Browse files
committed
Fix cross compilation testing
1 parent 7081fd6 commit a1d14f0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/pass/random.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
use rand::{rngs::SmallRng, Rng, SeedableRng};
2+
// mac-os `rand` does some pointer shenanigans
3+
//@compile-flags: -Zmiri-permissive-provenance
24

35
fn main() {
46
// Test `getrandom` directly (in multiple different versions).

ui_test/src/dependencies.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ pub fn build_dependencies(config: &Config) -> Result<Dependencies> {
3232
// support `cargo miri build` yet.
3333
build.arg("run");
3434

35+
if let Some(target) = &config.target {
36+
build.arg(format!("--target={target}"));
37+
}
38+
3539
// Reusable closure for setting up the environment both for artifact generation and `cargo_metadata`
3640
let setup_command = |cmd: &mut Command| {
3741
// Avoid poisoning the target directory and causing unnecessary rebuilds.
3842
cmd.env_remove("RUSTFLAGS");
3943

4044
cmd.envs(envs.iter().map(|(k, v)| (k, v)));
41-
if let Some(target) = &config.target {
42-
cmd.arg(format!("--target={target}"));
43-
}
4445
cmd.arg("--manifest-path").arg(manifest_path);
4546
};
4647

0 commit comments

Comments
 (0)