Skip to content
Merged
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
5 changes: 5 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ mod c {
panic!("RUST_COMPILER_RT_ROOT={} does not exist", root.display());
}

// Support deterministic builds by remapping the __FILE__ prefix if the
// compiler supports it. This fixes the nondeterminism caused by the
// use of that macro in lib/builtins/int_util.h in compiler-rt.
cfg.flag_if_supported(&format!("-ffile-prefix-map={}=.", root.display()));

let src_dir = root.join("lib/builtins");
for (sym, src) in sources.map.iter() {
let src = src_dir.join(src);
Expand Down