Skip to content

Commit

Permalink
Support deterministic builds by remapping the __FILE__ prefix if the …
Browse files Browse the repository at this point in the history
…compiler supports it.
  • Loading branch information
jgalenson committed Aug 19, 2019
1 parent 36da64f commit ca423fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@ 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.
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

0 comments on commit ca423fe

Please sign in to comment.