Don't split dwarf debug for a fully-reproducible build
authorXimin Luo <infinity0@debian.org>
Thu, 14 Jul 2022 11:17:37 +0000 (13:17 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Mon, 12 Jun 2023 16:36:56 +0000 (17:36 +0100)
Bug: https://github.com/rust-lang/rust/issues/34902

Gbp-Pq: Name u-reproducible-build.patch

compiler/rustc_llvm/build.rs

index 62ef5804dce6d7491f1a8c79620d4986114ed745..147b6675abe194f8957b6464e779f459b2c0d171 100644 (file)
@@ -179,6 +179,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;