File tree 1 file changed +9
-11
lines changed
src/tools/run-make-support/src/external_deps
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ impl Rustc {
346
346
// endif
347
347
// endif
348
348
// ```
349
- let flag = if is_windows ( ) {
349
+ if is_windows ( ) {
350
350
// So this is a bit hacky: we can't use the DLL version of libstdc++ because
351
351
// it pulls in the DLL version of libgcc, which means that we end up with 2
352
352
// instances of the DW2 unwinding implementation. This is a problem on
@@ -362,21 +362,19 @@ impl Rustc {
362
362
// So we end up with the following hack: we link use static:-bundle to only
363
363
// link the parts of libstdc++ that we actually use, which doesn't include
364
364
// the dependency on the pthreads DLL.
365
- if is_msvc ( ) { None } else { Some ( "-lstatic:-bundle=stdc++" ) }
365
+ if !is_msvc ( ) {
366
+ self . cmd . arg ( "-lstatic:-bundle=stdc++" ) ;
367
+ } ;
366
368
} else if is_darwin ( ) {
367
- Some ( "-lc++" )
369
+ self . cmd . arg ( "-lc++" ) ;
368
370
} else if is_aix ( ) {
369
371
self . cmd . arg ( "-lc++" ) ;
370
- Some ( "-lc++abi" )
372
+ self . cmd . arg ( "-lc++abi" ) ;
371
373
} else {
372
- match & uname ( ) [ ..] {
373
- "FreeBSD" | "SunOS" | "OpenBSD" => None ,
374
- _ => Some ( "-lstdc++" ) ,
375
- }
374
+ if !matches ! ( & uname( ) [ ..] , "FreeBSD" | "SunOS" | "OpenBSD" ) {
375
+ self . cmd . arg ( "-lstdc++" ) ;
376
+ } ;
376
377
} ;
377
- if let Some ( flag) = flag {
378
- self . cmd . arg ( flag) ;
379
- }
380
378
self
381
379
}
382
380
}
You can’t perform that action at this time.
0 commit comments