@@ -1624,21 +1624,13 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
1624
1624
builder. tool_exe ( Tool :: RunMakeSupport ) ;
1625
1625
}
1626
1626
1627
- // Also provide `rust_test_helpers` for the host.
1628
- builder. ensure ( TestHelpers { target : compiler. host } ) ;
1629
-
1630
1627
// ensure that `libproc_macro` is available on the host.
1631
1628
if suite == "mir-opt" {
1632
1629
builder. ensure ( compile:: Std :: new ( compiler, compiler. host ) . is_for_mir_opt_tests ( true ) ) ;
1633
1630
} else {
1634
1631
builder. ensure ( compile:: Std :: new ( compiler, compiler. host ) ) ;
1635
1632
}
1636
1633
1637
- // As well as the target
1638
- if suite != "mir-opt" {
1639
- builder. ensure ( TestHelpers { target } ) ;
1640
- }
1641
-
1642
1634
let mut cmd = builder. tool_cmd ( Tool :: Compiletest ) ;
1643
1635
1644
1636
if suite == "mir-opt" {
@@ -1804,11 +1796,18 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
1804
1796
}
1805
1797
1806
1798
let mut hostflags = flags. clone ( ) ;
1807
- hostflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( compiler. host) . display( ) ) ) ;
1808
1799
hostflags. extend ( linker_flags ( builder, compiler. host , LldThreads :: No , compiler. stage ) ) ;
1809
1800
1810
1801
let mut targetflags = flags;
1811
- targetflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( target) . display( ) ) ) ;
1802
+
1803
+ // Provide `rust_test_helpers` for both host and target.
1804
+ if suite == "ui" || suite == "incremental" {
1805
+ builder. ensure ( TestHelpers { target : compiler. host } ) ;
1806
+ builder. ensure ( TestHelpers { target } ) ;
1807
+ hostflags
1808
+ . push ( format ! ( "-Lnative={}" , builder. test_helpers_out( compiler. host) . display( ) ) ) ;
1809
+ targetflags. push ( format ! ( "-Lnative={}" , builder. test_helpers_out( target) . display( ) ) ) ;
1810
+ }
1812
1811
1813
1812
for flag in hostflags {
1814
1813
cmd. arg ( "--host-rustcflags" ) . arg ( flag) ;
0 commit comments