@@ -243,8 +243,11 @@ pub(crate) fn run_tests(
243243 host_compiler : & Compiler ,
244244 target_triple : & str ,
245245) {
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+ ) ;
248251
249252 if config:: get_bool ( "testsuite.no_sysroot" ) {
250253 build_sysroot:: build_sysroot (
@@ -297,11 +300,7 @@ struct TestRunner {
297300}
298301
299302impl 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 {
305304 let mut target_compiler = Compiler :: clif_with_triple ( & dirs, target_triple) ;
306305 if !is_native {
307306 target_compiler. set_cross_linker_and_runner ( ) ;
@@ -320,6 +319,10 @@ impl TestRunner {
320319 target_compiler. rustflags . push_str ( " -Clink-arg=-undefined -Clink-arg=dynamic_lookup" ) ;
321320 }
322321
322+ let jit_supported = is_native
323+ && target_compiler. triple . contains ( "x86_64" )
324+ && !target_compiler. triple . contains ( "windows" ) ;
325+
323326 Self { is_native, jit_supported, dirs, target_compiler }
324327 }
325328
0 commit comments