@@ -243,8 +243,11 @@ pub(crate) fn run_tests(
243
243
host_compiler : & Compiler ,
244
244
target_triple : & str ,
245
245
) {
246
- let runner =
247
- TestRunner :: new ( dirs. clone ( ) , host_compiler. triple . clone ( ) , target_triple. to_string ( ) ) ;
246
+ let runner = TestRunner :: new (
247
+ dirs. clone ( ) ,
248
+ target_triple. to_owned ( ) ,
249
+ host_compiler. triple == target_triple,
250
+ ) ;
248
251
249
252
if config:: get_bool ( "testsuite.no_sysroot" ) {
250
253
build_sysroot:: build_sysroot (
@@ -297,11 +300,7 @@ struct TestRunner {
297
300
}
298
301
299
302
impl TestRunner {
300
- pub fn new ( dirs : Dirs , host_triple : String , target_triple : String ) -> Self {
301
- let is_native = host_triple == target_triple;
302
- let jit_supported =
303
- is_native && host_triple. contains ( "x86_64" ) && !host_triple. contains ( "windows" ) ;
304
-
303
+ pub fn new ( dirs : Dirs , target_triple : String , is_native : bool ) -> Self {
305
304
let mut target_compiler = Compiler :: clif_with_triple ( & dirs, target_triple) ;
306
305
if !is_native {
307
306
target_compiler. set_cross_linker_and_runner ( ) ;
@@ -320,6 +319,10 @@ impl TestRunner {
320
319
target_compiler. rustflags . push_str ( " -Clink-arg=-undefined -Clink-arg=dynamic_lookup" ) ;
321
320
}
322
321
322
+ let jit_supported = is_native
323
+ && target_compiler. triple . contains ( "x86_64" )
324
+ && !target_compiler. triple . contains ( "windows" ) ;
325
+
323
326
Self { is_native, jit_supported, dirs, target_compiler }
324
327
}
325
328
0 commit comments