From 1563b6e6b627931aece219299486f774fcfbc300 Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Sun, 26 Sep 2021 03:25:38 +0100 Subject: [PATCH] Don't split dwarf debug for a fully-reproducible build Bug: https://github.com/rust-lang/rust/issues/34902 Gbp-Pq: Name u-reproducible-build.patch --- compiler/rustc_llvm/build.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs index 621363bed..7a91591c2 100644 --- a/compiler/rustc_llvm/build.rs +++ b/compiler/rustc_llvm/build.rs @@ -134,6 +134,11 @@ fn main() { let mut cfg = cc::Build::new(); cfg.warnings(false); for flag in cxxflags.split_whitespace() { + // Split-dwarf gives unreproducible DW_AT_GNU_dwo_id so don't do it + if flag == "-gsplit-dwarf" { + continue; + } + // Ignore flags like `-m64` when we're doing a cross build if is_crossed && flag.starts_with("-m") { continue; -- 2.30.2