summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/12/llvm/default.nix
diff options
context:
space:
mode:
author7c6f434c <7c6f434c@mail.ru>2021-12-31 21:45:53 +0000
committerGitHub <noreply@github.com>2021-12-31 21:45:53 +0000
commit84fb429d21e3fda844e7722217267c0edf8d0724 (patch)
tree12f0d5469c7a1bf66c362f35c9ebde76a560ae63 /pkgs/development/compilers/llvm/12/llvm/default.nix
parentf2adf20b7108e34156c443933b44cda608e9ac23 (diff)
parent35223810a177e27921341c0f5a729bb907196419 (diff)
downloadnixpkgs-84fb429d21e3fda844e7722217267c0edf8d0724.tar
nixpkgs-84fb429d21e3fda844e7722217267c0edf8d0724.tar.gz
nixpkgs-84fb429d21e3fda844e7722217267c0edf8d0724.tar.bz2
nixpkgs-84fb429d21e3fda844e7722217267c0edf8d0724.tar.lz
nixpkgs-84fb429d21e3fda844e7722217267c0edf8d0724.tar.xz
nixpkgs-84fb429d21e3fda844e7722217267c0edf8d0724.tar.zst
nixpkgs-84fb429d21e3fda844e7722217267c0edf8d0724.zip
Merge pull request #150018 from trofi/fix-llvm-for-gcc-12
llvm_{5..12}: fix tests against upcoming gcc-12
Diffstat (limited to 'pkgs/development/compilers/llvm/12/llvm/default.nix')
-rw-r--r--pkgs/development/compilers/llvm/12/llvm/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix
index bb5676b9d48..8416a550443 100644
--- a/pkgs/development/compilers/llvm/12/llvm/default.nix
+++ b/pkgs/development/compilers/llvm/12/llvm/default.nix
@@ -105,6 +105,33 @@ in stdenv.mkDerivation (rec {
     rm test/ExecutionEngine/frem.ll
   '' + ''
     patchShebangs test/BugPoint/compile-custom.ll.py
+  '' + ''
+    # Tweak tests to ignore namespace part of type to support
+    # gcc-12: https://gcc.gnu.org/PR103598.
+    # The change below mangles strings like:
+    #    CHECK-NEXT: Starting llvm::Function pass manager run.
+    # to:
+    #    CHECK-NEXT: Starting {{.*}}Function pass manager run.
+    for f in \
+      test/Other/new-pass-manager.ll \
+      test/Other/new-pm-O0-defaults.ll \
+      test/Other/new-pm-defaults.ll \
+      test/Other/new-pm-lto-defaults.ll \
+      test/Other/new-pm-thinlto-defaults.ll \
+      test/Other/pass-pipeline-parsing.ll \
+      test/Transforms/Inline/cgscc-incremental-invalidate.ll \
+      test/Transforms/Inline/clear-analyses.ll \
+      test/Transforms/LoopUnroll/unroll-loop-invalidation.ll \
+      test/Transforms/SCCP/ipsccp-preserve-analysis.ll \
+      test/Transforms/SCCP/preserve-analysis.ll \
+      test/Transforms/SROA/dead-inst.ll \
+      test/tools/gold/X86/new-pm.ll \
+      ; do
+      echo "PATCH: $f"
+      substituteInPlace $f \
+        --replace 'Starting llvm::' 'Starting {{.*}}' \
+        --replace 'Finished llvm::' 'Finished {{.*}}'
+    done
   '';
 
   # hacky fix: created binaries need to be run before installation