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)
committerJeremy Bícha <jbicha@ubuntu.com>
Mon, 26 Jun 2023 21:16:27 +0000 (22:16 +0100)
Bug: https://github.com/rust-lang/rust/issues/34902

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

compiler/rustc_llvm/build.rs

index 28e092c1eb72c1c9205068aa388bc5d912dc0a8c..0c95da585b7a6ae64363491f033382191d053c3d 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;