mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 11:30:35 +08:00
llvm_9: patch to fix a test on older CPUs
Taken from nixpkgs master commitsea306f6dfc+9aa8ae999a. Right now it didn't build on the more loaded platforms (x86_64-*) https://hydra.nixos.org/eval/1676683 and on x86_64-linux that breaks very many builds. (wendy machine is being too active, so restarts don't help)
This commit is contained in:
@@ -55,6 +55,12 @@ in stdenv.mkDerivation (rec {
|
||||
|
||||
propagatedBuildInputs = [ ncurses zlib ];
|
||||
|
||||
patches = [
|
||||
# Force a test to evaluate the saved benchmark for a CPU for which LLVM has
|
||||
# an execution model. See NixOS/nixpkgs#119673.
|
||||
../exegesis-force-bdver2.patch
|
||||
];
|
||||
|
||||
postPatch = optionalString stdenv.isDarwin ''
|
||||
substituteInPlace cmake/modules/AddLLVM.cmake \
|
||||
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
|
||||
|
||||
11
pkgs/development/compilers/llvm/exegesis-force-bdver2.patch
Normal file
11
pkgs/development/compilers/llvm/exegesis-force-bdver2.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
diff --git a/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s b/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s
|
||||
index 3fc1f31d54dc..a4c9bdd92131 100644
|
||||
--- a/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s
|
||||
+++ b/test/tools/llvm-exegesis/X86/uops-CMOV16rm-noreg.s
|
||||
@@ -1,5 +1,6 @@
|
||||
# RUN: llvm-exegesis -mode=uops -opcode-name=CMOV16rm -benchmarks-file=%t.CMOV16rm-uops.yaml
|
||||
# RUN: FileCheck -check-prefixes=CHECK-YAML -input-file=%t.CMOV16rm-uops.yaml %s
|
||||
+# RUN: sed -i 's,cpu_name:.*,cpu_name: bdver2,g' %t.CMOV16rm-uops.yaml
|
||||
# RUN: llvm-exegesis -mcpu=bdver2 -mode=analysis -benchmarks-file=%t.CMOV16rm-uops.yaml -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.1 -analysis-inconsistency-epsilon=0.1 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-CLUSTERS %s
|
||||
|
||||
# https://bugs.llvm.org/show_bug.cgi?id=41448
|
||||
Reference in New Issue
Block a user