File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -2384,15 +2384,19 @@ pub fn run_cargo(
2384
2384
let mut deps = Vec :: new ( ) ;
2385
2385
let mut toplevel = Vec :: new ( ) ;
2386
2386
let ok = stream_cargo ( builder, cargo, tail_args, & mut |msg| {
2387
- let ( filenames , crate_types) = match msg {
2387
+ let ( filenames_vec , crate_types) = match msg {
2388
2388
CargoMessage :: CompilerArtifact {
2389
2389
filenames,
2390
2390
target : CargoTarget { crate_types } ,
2391
2391
..
2392
- } => ( filenames, crate_types) ,
2392
+ } => {
2393
+ let mut f: Vec < String > = filenames. into_iter ( ) . map ( |s| s. into_owned ( ) ) . collect ( ) ;
2394
+ f. sort ( ) ; // Sort the filenames
2395
+ ( f, crate_types)
2396
+ }
2393
2397
_ => return ,
2394
2398
} ;
2395
- for filename in filenames {
2399
+ for filename in filenames_vec {
2396
2400
// Skip files like executables
2397
2401
let mut keep = false ;
2398
2402
if filename. ends_with ( ".lib" )
Original file line number Diff line number Diff line change @@ -1528,8 +1528,12 @@ impl Step for Libunwind {
1528
1528
1529
1529
// FIXME: https://github.com/alexcrichton/cc-rs/issues/545#issuecomment-679242845
1530
1530
let mut count = 0 ;
1531
- for entry in fs:: read_dir ( & out_dir) . unwrap ( ) {
1532
- let file = entry. unwrap ( ) . path ( ) . canonicalize ( ) . unwrap ( ) ;
1531
+ let mut files = fs:: read_dir ( & out_dir)
1532
+ . unwrap ( )
1533
+ . map ( |entry| entry. unwrap ( ) . path ( ) . canonicalize ( ) . unwrap ( ) )
1534
+ . collect :: < Vec < _ > > ( ) ;
1535
+ files. sort ( ) ;
1536
+ for file in files {
1533
1537
if file. is_file ( ) && file. extension ( ) == Some ( OsStr :: new ( "o" ) ) {
1534
1538
// Object file name without the hash prefix is "Unwind-EHABI", "Unwind-seh" or "libunwind".
1535
1539
let base_name = unhashed_basename ( & file) ;
You can’t perform that action at this time.
0 commit comments