@@ -1612,16 +1612,23 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
16121612 . ensure ( dist:: DebuggerScripts { sysroot : builder. sysroot ( compiler) , host : target } ) ;
16131613 }
16141614
1615- builder. ensure ( compile:: Std :: new ( compiler, target) ) ;
1615+ if suite == "mir-opt" {
1616+ builder. ensure ( compile:: Std :: new_for_mir_opt_tests ( compiler, target) ) ;
1617+ } else {
1618+ builder. ensure ( compile:: Std :: new ( compiler, target) ) ;
1619+ }
1620+
16161621 // ensure that `libproc_macro` is available on the host.
16171622 builder. ensure ( compile:: Std :: new ( compiler, compiler. host ) ) ;
16181623
16191624 // Also provide `rust_test_helpers` for the host.
16201625 builder. ensure ( TestHelpers { target : compiler. host } ) ;
16211626
1622- // As well as the target, except for plain wasm32, which can't build it
1623- if !target. contains ( "wasm" ) || target. contains ( "emscripten" ) {
1624- builder. ensure ( TestHelpers { target } ) ;
1627+ if suite != "mir-opt" {
1628+ // As well as the target, except for plain wasm32, which can't build it
1629+ if !target. contains ( "wasm" ) || target. contains ( "emscripten" ) {
1630+ builder. ensure ( TestHelpers { target } ) ;
1631+ }
16251632 }
16261633
16271634 builder. ensure ( RemoteCopyLibs { compiler, target } ) ;
@@ -1752,11 +1759,13 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17521759 cmd. arg ( "--host-rustcflags" ) . arg ( flag) ;
17531760 }
17541761
1755- let mut targetflags = flags;
1756- targetflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( target) . display( ) ) ) ;
1757- targetflags. extend ( linker_flags ( builder, compiler. host , LldThreads :: No ) ) ;
1758- for flag in targetflags {
1759- cmd. arg ( "--target-rustcflags" ) . arg ( flag) ;
1762+ if mode != "mir-opt" {
1763+ let mut targetflags = flags;
1764+ targetflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( target) . display( ) ) ) ;
1765+ targetflags. extend ( linker_flags ( builder, compiler. host , LldThreads :: No ) ) ;
1766+ for flag in targetflags {
1767+ cmd. arg ( "--target-rustcflags" ) . arg ( flag) ;
1768+ }
17601769 }
17611770
17621771 cmd. arg ( "--python" ) . arg ( builder. python ( ) ) ;
0 commit comments