Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2376,15 +2376,19 @@ pub fn run_cargo(
let mut deps = Vec::new();
let mut toplevel = Vec::new();
let ok = stream_cargo(builder, cargo, tail_args, &mut |msg| {
let (filenames, crate_types) = match msg {
let (filenames_vec, crate_types) = match msg {
CargoMessage::CompilerArtifact {
filenames,
target: CargoTarget { crate_types },
..
} => (filenames, crate_types),
} => {
let mut f: Vec<String> = filenames.into_iter().map(|s| s.into_owned()).collect();
f.sort(); // Sort the filenames
(f, crate_types)
}
_ => return,
};
for filename in filenames {
for filename in filenames_vec {
// Skip files like executables
let mut keep = false;
if filename.ends_with(".lib")
Expand Down
8 changes: 6 additions & 2 deletions src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1528,8 +1528,12 @@ impl Step for Libunwind {

// FIXME: https://github.com/alexcrichton/cc-rs/issues/545#issuecomment-679242845
let mut count = 0;
for entry in fs::read_dir(&out_dir).unwrap() {
let file = entry.unwrap().path().canonicalize().unwrap();
let mut files = fs::read_dir(&out_dir)
.unwrap()
.map(|entry| entry.unwrap().path().canonicalize().unwrap())
.collect::<Vec<_>>();
files.sort();
for file in files {
if file.is_file() && file.extension() == Some(OsStr::new("o")) {
// Object file name without the hash prefix is "Unwind-EHABI", "Unwind-seh" or "libunwind".
let base_name = unhashed_basename(&file);
Expand Down
Loading