@@ -285,7 +285,7 @@ impl Step for Mingw {
285285 /// without any extra installed software (e.g., we bundle gcc, libraries, etc).
286286 fn run ( self , builder : & Builder < ' _ > ) -> Option < GeneratedTarball > {
287287 let host = self . host ;
288- if !host. contains ( "pc-windows-gnu" ) {
288+ if !host. ends_with ( "pc-windows-gnu" ) {
289289 return None ;
290290 }
291291
@@ -341,7 +341,7 @@ impl Step for Rustc {
341341 // anything requiring us to distribute a license, but it's likely the
342342 // install will *also* include the rust-mingw package, which also needs
343343 // licenses, so to be safe we just include it here in all MinGW packages.
344- if host. contains ( "pc-windows-gnu" ) {
344+ if host. ends_with ( "pc-windows-gnu" ) {
345345 make_win_dist ( tarball. image_dir ( ) , & tmpdir ( builder) , host, builder) ;
346346 tarball. add_dir ( builder. src . join ( "src/etc/third-party" ) , "share/doc" ) ;
347347 }
@@ -1352,7 +1352,7 @@ impl Step for Extended {
13521352 tarballs. push ( builder. ensure ( Rustc { compiler : builder. compiler ( stage, target) } ) ) ;
13531353 tarballs. push ( builder. ensure ( Std { compiler, target } ) . expect ( "missing std" ) ) ;
13541354
1355- if target. contains ( "windows-gnu" ) {
1355+ if target. ends_with ( "windows-gnu" ) {
13561356 tarballs. push ( builder. ensure ( Mingw { host : target } ) . expect ( "missing mingw" ) ) ;
13571357 }
13581358
@@ -1522,7 +1522,7 @@ impl Step for Extended {
15221522 prepare ( tool) ;
15231523 }
15241524 }
1525- if target. contains ( "windows-gnu" ) {
1525+ if target. ends_with ( "windows-gnu" ) {
15261526 prepare ( "rust-mingw" ) ;
15271527 }
15281528
@@ -1711,7 +1711,7 @@ impl Step for Extended {
17111711 . arg ( "-t" )
17121712 . arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
17131713 ) ;
1714- if target. contains ( "windows-gnu" ) {
1714+ if target. ends_with ( "windows-gnu" ) {
17151715 builder. run (
17161716 Command :: new ( & heat)
17171717 . current_dir ( & exe)
@@ -1760,7 +1760,7 @@ impl Step for Extended {
17601760 if built_tools. contains ( "miri" ) {
17611761 cmd. arg ( "-dMiriDir=miri" ) ;
17621762 }
1763- if target. contains ( "windows-gnu" ) {
1763+ if target. ends_with ( "windows-gnu" ) {
17641764 cmd. arg ( "-dGccDir=rust-mingw" ) ;
17651765 }
17661766 builder. run ( & mut cmd) ;
@@ -1787,7 +1787,7 @@ impl Step for Extended {
17871787 }
17881788 candle ( "AnalysisGroup.wxs" . as_ref ( ) ) ;
17891789
1790- if target. contains ( "windows-gnu" ) {
1790+ if target. ends_with ( "windows-gnu" ) {
17911791 candle ( "GccGroup.wxs" . as_ref ( ) ) ;
17921792 }
17931793
@@ -1829,7 +1829,7 @@ impl Step for Extended {
18291829 cmd. arg ( "MiriGroup.wixobj" ) ;
18301830 }
18311831
1832- if target. contains ( "windows-gnu" ) {
1832+ if target. ends_with ( "windows-gnu" ) {
18331833 cmd. arg ( "GccGroup.wixobj" ) ;
18341834 }
18351835 // ICE57 wrongly complains about the shortcuts
@@ -1859,7 +1859,9 @@ fn add_env(builder: &Builder<'_>, cmd: &mut Command, target: TargetSelection) {
18591859 . env ( "CFG_BUILD" , target. triple )
18601860 . env ( "CFG_CHANNEL" , & builder. config . channel ) ;
18611861
1862- if target. contains ( "windows-gnu" ) {
1862+ if target. contains ( "windows-gnullvm" ) {
1863+ cmd. env ( "CFG_MINGW" , "1" ) . env ( "CFG_ABI" , "LLVM" ) ;
1864+ } else if target. contains ( "windows-gnu" ) {
18631865 cmd. env ( "CFG_MINGW" , "1" ) . env ( "CFG_ABI" , "GNU" ) ;
18641866 } else {
18651867 cmd. env ( "CFG_MINGW" , "0" ) . env ( "CFG_ABI" , "MSVC" ) ;
0 commit comments