Skip to content

Commit 3e6a927

Browse files
committed
Explain why we're sorting the modules.
1 parent a46e36f commit 3e6a927

File tree

1 file changed

+1
-0
lines changed
  • src/librustc_codegen_llvm/back

1 file changed

+1
-0
lines changed

src/librustc_codegen_llvm/back/lto.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ fn fat_lto(cgcx: &CodegenContext<LlvmCodegenBackend>,
278278
}
279279
}
280280
}).collect::<Vec<_>>();
281+
// Sort the modules to ensure we produce deterministic results.
281282
new_modules.sort_by(|module1, module2| module1.1.partial_cmp(&module2.1).unwrap());
282283
serialized_modules.extend(new_modules);
283284
serialized_modules.extend(cached_modules.into_iter().map(|(buffer, wp)| {

0 commit comments

Comments
 (0)