We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 36da64f + c8f7928 commit f0b4323Copy full SHA for f0b4323
build.rs
@@ -423,6 +423,11 @@ mod c {
423
panic!("RUST_COMPILER_RT_ROOT={} does not exist", root.display());
424
}
425
426
+ // Support deterministic builds by remapping the __FILE__ prefix if the
427
+ // compiler supports it. This fixes the nondeterminism caused by the
428
+ // use of that macro in lib/builtins/int_util.h in compiler-rt.
429
+ cfg.flag_if_supported(&format!("-ffile-prefix-map={}=.", root.display()));
430
+
431
let src_dir = root.join("lib/builtins");
432
for (sym, src) in sources.map.iter() {
433
let src = src_dir.join(src);
0 commit comments