Skip to content

Commit 90132e0

Browse files
committed
try to make this cross-platform safe
1 parent 7dd0e38 commit 90132e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ use std::io::{self, BufReader};
3636
use std::path::{Path, PathBuf};
3737
use std::process::{Child, Command, ExitStatus, Output, Stdio};
3838
use std::str;
39+
use std::env::consts::DLL_EXTENSION;
3940

4041
use extract_gdb_version;
4142
use is_android_gdb_target;
@@ -1577,7 +1578,9 @@ impl<'test> TestCx<'test> {
15771578
rustc.arg(format!("{}={}/lib{}",
15781579
aux_crate.key,
15791580
aux_dir.display(),
1580-
&aux_crate.value.replace(".rs", ".so").replace("-","_")));
1581+
aux_crate.value.replace(".rs", &format!(".{}", DLL_EXTENSION))
1582+
.replace("-","_")
1583+
));
15811584
}
15821585

15831586
self.compose_and_run(

0 commit comments

Comments
 (0)