diff options
author | 7c6f434c <7c6f434c@mail.ru> | 2021-12-31 21:45:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-31 21:45:53 +0000 |
commit | 84fb429d21e3fda844e7722217267c0edf8d0724 (patch) | |
tree | 12f0d5469c7a1bf66c362f35c9ebde76a560ae63 /pkgs/development/compilers/llvm | |
parent | f2adf20b7108e34156c443933b44cda608e9ac23 (diff) | |
parent | 35223810a177e27921341c0f5a729bb907196419 (diff) | |
download | nixpkgs-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')
-rw-r--r-- | pkgs/development/compilers/llvm/10/llvm/default.nix | 26 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/11/llvm/default.nix | 26 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/12/llvm/default.nix | 27 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/5/llvm/default.nix | 21 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/6/llvm/default.nix | 23 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/7/llvm/default.nix | 25 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/8/llvm/default.nix | 26 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/9/llvm/default.nix | 26 |
8 files changed, 200 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/10/llvm/default.nix b/pkgs/development/compilers/llvm/10/llvm/default.nix index b40d3070c05..68a4dc3170c 100644 --- a/pkgs/development/compilers/llvm/10/llvm/default.nix +++ b/pkgs/development/compilers/llvm/10/llvm/default.nix @@ -122,6 +122,32 @@ 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-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 diff --git a/pkgs/development/compilers/llvm/11/llvm/default.nix b/pkgs/development/compilers/llvm/11/llvm/default.nix index 8d14ee131bd..2f1c7eb85e6 100644 --- a/pkgs/development/compilers/llvm/11/llvm/default.nix +++ b/pkgs/development/compilers/llvm/11/llvm/default.nix @@ -120,6 +120,32 @@ 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-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 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 diff --git a/pkgs/development/compilers/llvm/5/llvm/default.nix b/pkgs/development/compilers/llvm/5/llvm/default.nix index 339c7a36931..d55f1300ffe 100644 --- a/pkgs/development/compilers/llvm/5/llvm/default.nix +++ b/pkgs/development/compilers/llvm/5/llvm/default.nix @@ -100,6 +100,27 @@ stdenv.mkDerivation ({ substituteInPlace unittests/Support/CMakeLists.txt \ --replace "add_subdirectory(DynamicLibrary)" "" rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp + '' + '' + # 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-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 \ + ; 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 diff --git a/pkgs/development/compilers/llvm/6/llvm/default.nix b/pkgs/development/compilers/llvm/6/llvm/default.nix index 5847d50a6f9..746a18612cb 100644 --- a/pkgs/development/compilers/llvm/6/llvm/default.nix +++ b/pkgs/development/compilers/llvm/6/llvm/default.nix @@ -93,6 +93,29 @@ stdenv.mkDerivation ({ substituteInPlace unittests/Support/CMakeLists.txt \ --replace "add_subdirectory(DynamicLibrary)" "" rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp + '' + '' + # 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-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/SROA/dead-inst.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 diff --git a/pkgs/development/compilers/llvm/7/llvm/default.nix b/pkgs/development/compilers/llvm/7/llvm/default.nix index cfa4fdf7ac3..57c6d7eb5f3 100644 --- a/pkgs/development/compilers/llvm/7/llvm/default.nix +++ b/pkgs/development/compilers/llvm/7/llvm/default.nix @@ -110,6 +110,31 @@ in stdenv.mkDerivation ({ 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-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/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 diff --git a/pkgs/development/compilers/llvm/8/llvm/default.nix b/pkgs/development/compilers/llvm/8/llvm/default.nix index 902a379b7aa..1decdce26a8 100644 --- a/pkgs/development/compilers/llvm/8/llvm/default.nix +++ b/pkgs/development/compilers/llvm/8/llvm/default.nix @@ -104,6 +104,32 @@ in stdenv.mkDerivation ({ rm test/CodeGen/AArch64/wineh4.mir '' + '' 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-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 diff --git a/pkgs/development/compilers/llvm/9/llvm/default.nix b/pkgs/development/compilers/llvm/9/llvm/default.nix index ed21ac74a1a..29c0558237c 100644 --- a/pkgs/development/compilers/llvm/9/llvm/default.nix +++ b/pkgs/development/compilers/llvm/9/llvm/default.nix @@ -119,6 +119,32 @@ in stdenv.mkDerivation (rec { # Fix x86 gold test on non-x86 platforms # (similar fix made to others in this directory previously, FWIW) patch -p1 -i ${./fix-test-on-non-x86-like-others.patch} + '' + '' + # 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-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 |