@@ -1611,16 +1611,23 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
16111611 . ensure ( dist:: DebuggerScripts { sysroot : builder. sysroot ( compiler) , host : target } ) ;
16121612 }
16131613
1614- builder. ensure ( compile:: Std :: new ( compiler, target) ) ;
1614+ if suite == "mir-opt" {
1615+ builder. ensure ( compile:: Std :: new_for_mir_opt_tests ( compiler, target) ) ;
1616+ } else {
1617+ builder. ensure ( compile:: Std :: new ( compiler, target) ) ;
1618+ }
1619+
16151620 // ensure that `libproc_macro` is available on the host.
16161621 builder. ensure ( compile:: Std :: new ( compiler, compiler. host ) ) ;
16171622
16181623 // Also provide `rust_test_helpers` for the host.
16191624 builder. ensure ( TestHelpers { target : compiler. host } ) ;
16201625
1621- // As well as the target, except for plain wasm32, which can't build it
1622- if !target. contains ( "wasm" ) || target. contains ( "emscripten" ) {
1623- builder. ensure ( TestHelpers { target } ) ;
1626+ if suite != "mir-opt" {
1627+ // As well as the target, except for plain wasm32, which can't build it
1628+ if !target. contains ( "wasm" ) || target. contains ( "emscripten" ) {
1629+ builder. ensure ( TestHelpers { target } ) ;
1630+ }
16241631 }
16251632
16261633 builder. ensure ( RemoteCopyLibs { compiler, target } ) ;
@@ -1749,11 +1756,13 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17491756 cmd. arg ( "--host-rustcflags" ) . arg ( flag) ;
17501757 }
17511758
1752- let mut targetflags = flags;
1753- targetflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( target) . display( ) ) ) ;
1754- targetflags. extend ( linker_flags ( builder, compiler. host , LldThreads :: No ) ) ;
1755- for flag in targetflags {
1756- cmd. arg ( "--target-rustcflags" ) . arg ( flag) ;
1759+ if mode != "mir-opt" {
1760+ let mut targetflags = flags;
1761+ targetflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( target) . display( ) ) ) ;
1762+ targetflags. extend ( linker_flags ( builder, compiler. host , LldThreads :: No ) ) ;
1763+ for flag in targetflags {
1764+ cmd. arg ( "--target-rustcflags" ) . arg ( flag) ;
1765+ }
17571766 }
17581767
17591768 cmd. arg ( "--python" ) . arg ( builder. python ( ) ) ;
0 commit comments