summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2017-03-06 08:33:16 -0600
committerWill Dietz <w@wdtz.org>2017-03-08 09:50:04 -0600
commit3bc5a68a63605c86f8a3822476a947a4f40ce5d6 (patch)
tree94ab0459c93eb3c83dad17f7730ff6a7ca97e0a3 /pkgs/development/compilers/llvm
parent7a08a44b525ae5ee2c4f0d7e0cee187a9f8dd2a8 (diff)
downloadnixlib-3bc5a68a63605c86f8a3822476a947a4f40ce5d6.tar
nixlib-3bc5a68a63605c86f8a3822476a947a4f40ce5d6.tar.gz
nixlib-3bc5a68a63605c86f8a3822476a947a4f40ce5d6.tar.bz2
nixlib-3bc5a68a63605c86f8a3822476a947a4f40ce5d6.tar.lz
nixlib-3bc5a68a63605c86f8a3822476a947a4f40ce5d6.tar.xz
nixlib-3bc5a68a63605c86f8a3822476a947a4f40ce5d6.tar.zst
nixlib-3bc5a68a63605c86f8a3822476a947a4f40ce5d6.zip
llvm4: enable tests
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r--pkgs/development/compilers/llvm/4/llvm.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix
index 2d36f7cd0fb1..c346f536158e 100644
--- a/pkgs/development/compilers/llvm/4/llvm.nix
+++ b/pkgs/development/compilers/llvm/4/llvm.nix
@@ -50,12 +50,19 @@ in stdenv.mkDerivation rec {
   # 10.9. This is a temporary measure until nixpkgs darwin support is
   # updated.
   postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
-        sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+    sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
   ''
   # Patch llvm-config to return correct library path based on --link-{shared,static}.
   + stdenv.lib.optionalString (enableSharedLibraries) ''
     substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
     patch -p1 < ./llvm-outputs.patch
+  ''
+  # Remove broken tests: (https://bugs.llvm.org//show_bug.cgi?id=31610)
+  + ''
+    rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll
+    rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll
+    rm test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll
+    rm test/CodeGen/AMDGPU/runtime-metadata.ll
   '';
 
   # hacky fix: created binaries need to be run before installation
@@ -85,6 +92,14 @@ in stdenv.mkDerivation rec {
     rm -fR $out
 
     paxmark m bin/{lli,llvm-rtdyld}
+    paxmark m unittests/ExecutionEngine/MCJIT/MCJITTests
+    paxmark m unittests/ExecutionEngine/Orc/OrcJITTests
+    paxmark m unittests/Support/SupportTests
+    paxmark m bin/lli-child-target
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
   '';
 
   postInstall = ""
@@ -103,6 +118,10 @@ in stdenv.mkDerivation rec {
     ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
   '';
 
+  doCheck = stdenv.isLinux;
+
+  checkTarget = "check-all";
+
   enableParallelBuilding = true;
 
   passthru.src = src;