@@ -285,7 +285,7 @@ impl Step for Mingw {
285
285
/// without any extra installed software (e.g., we bundle gcc, libraries, etc).
286
286
fn run ( self , builder : & Builder < ' _ > ) -> Option < GeneratedTarball > {
287
287
let host = self . host ;
288
- if !host. contains ( "pc-windows-gnu" ) {
288
+ if !host. ends_with ( "pc-windows-gnu" ) {
289
289
return None ;
290
290
}
291
291
@@ -341,7 +341,7 @@ impl Step for Rustc {
341
341
// anything requiring us to distribute a license, but it's likely the
342
342
// install will *also* include the rust-mingw package, which also needs
343
343
// 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" ) {
345
345
make_win_dist ( tarball. image_dir ( ) , & tmpdir ( builder) , host, builder) ;
346
346
tarball. add_dir ( builder. src . join ( "src/etc/third-party" ) , "share/doc" ) ;
347
347
}
@@ -1352,7 +1352,7 @@ impl Step for Extended {
1352
1352
tarballs. push ( builder. ensure ( Rustc { compiler : builder. compiler ( stage, target) } ) ) ;
1353
1353
tarballs. push ( builder. ensure ( Std { compiler, target } ) . expect ( "missing std" ) ) ;
1354
1354
1355
- if target. contains ( "windows-gnu" ) {
1355
+ if target. ends_with ( "windows-gnu" ) {
1356
1356
tarballs. push ( builder. ensure ( Mingw { host : target } ) . expect ( "missing mingw" ) ) ;
1357
1357
}
1358
1358
@@ -1522,7 +1522,7 @@ impl Step for Extended {
1522
1522
prepare ( tool) ;
1523
1523
}
1524
1524
}
1525
- if target. contains ( "windows-gnu" ) {
1525
+ if target. ends_with ( "windows-gnu" ) {
1526
1526
prepare ( "rust-mingw" ) ;
1527
1527
}
1528
1528
@@ -1711,7 +1711,7 @@ impl Step for Extended {
1711
1711
. arg ( "-t" )
1712
1712
. arg ( etc. join ( "msi/remove-duplicates.xsl" ) ) ,
1713
1713
) ;
1714
- if target. contains ( "windows-gnu" ) {
1714
+ if target. ends_with ( "windows-gnu" ) {
1715
1715
builder. run (
1716
1716
Command :: new ( & heat)
1717
1717
. current_dir ( & exe)
@@ -1760,7 +1760,7 @@ impl Step for Extended {
1760
1760
if built_tools. contains ( "miri" ) {
1761
1761
cmd. arg ( "-dMiriDir=miri" ) ;
1762
1762
}
1763
- if target. contains ( "windows-gnu" ) {
1763
+ if target. ends_with ( "windows-gnu" ) {
1764
1764
cmd. arg ( "-dGccDir=rust-mingw" ) ;
1765
1765
}
1766
1766
builder. run ( & mut cmd) ;
@@ -1787,7 +1787,7 @@ impl Step for Extended {
1787
1787
}
1788
1788
candle ( "AnalysisGroup.wxs" . as_ref ( ) ) ;
1789
1789
1790
- if target. contains ( "windows-gnu" ) {
1790
+ if target. ends_with ( "windows-gnu" ) {
1791
1791
candle ( "GccGroup.wxs" . as_ref ( ) ) ;
1792
1792
}
1793
1793
@@ -1829,7 +1829,7 @@ impl Step for Extended {
1829
1829
cmd. arg ( "MiriGroup.wixobj" ) ;
1830
1830
}
1831
1831
1832
- if target. contains ( "windows-gnu" ) {
1832
+ if target. ends_with ( "windows-gnu" ) {
1833
1833
cmd. arg ( "GccGroup.wixobj" ) ;
1834
1834
}
1835
1835
// ICE57 wrongly complains about the shortcuts
@@ -1859,7 +1859,9 @@ fn add_env(builder: &Builder<'_>, cmd: &mut Command, target: TargetSelection) {
1859
1859
. env ( "CFG_BUILD" , target. triple )
1860
1860
. env ( "CFG_CHANNEL" , & builder. config . channel ) ;
1861
1861
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" ) {
1863
1865
cmd. env ( "CFG_MINGW" , "1" ) . env ( "CFG_ABI" , "GNU" ) ;
1864
1866
} else {
1865
1867
cmd. env ( "CFG_MINGW" , "0" ) . env ( "CFG_ABI" , "MSVC" ) ;
0 commit comments