Merge pull request #23644 from dtzWill/update/llvm-rc4-and-tests

llvm4: rc3 -> rc4, enable tests
This commit is contained in:
Jörg Thalheim 2017-03-09 07:53:29 +01:00 committed by GitHub
commit d75cec39d0
7 changed files with 29 additions and 10 deletions

View File

@ -6,7 +6,7 @@ let
name = "clang-${version}";
unpackPhase = ''
unpackFile ${fetch "cfe" "1lsdyrz82vyrsc7k0ah1zmzzan61s5kakxrkxgfbmklp3pclfkwp"}
unpackFile ${fetch "cfe" "062n17mfsn85dx3qy1qvq8rfxi7hcbr2nj70v2dah3xmy28i3yaq"}
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}

View File

@ -3,7 +3,7 @@ let
callPackage = newScope (self // { inherit stdenv isl release_version version fetch; });
release_version = "4.0.0";
rc = "rc3";
rc = "rc4";
version = "${release_version}${rc}";
fetch = name: sha256: fetchurl {
@ -13,8 +13,8 @@ let
inherit sha256;
};
compiler-rt_src = fetch "compiler-rt" "0jfqhz95cp15c5688c6l9mr12s0qp86milpcrjlc93dc2jy08ba5";
clang-tools-extra_src = fetch "clang-tools-extra" "1c9c507w3f5vm153rdd0kmzvv2ski6z439izk01zf5snfwkqxkq8";
compiler-rt_src = fetch "compiler-rt" "1bxz2z9mxbx7211xfgsn5inwvpz53d1cqg76h8166dsli27xwkjm";
clang-tools-extra_src = fetch "clang-tools-extra" "0zkgnnv3srqxf44q4a5n3wpizf71mlq8w5rnwfwhdx777k94s5nx";
self = {
llvm = callPackage ./llvm.nix {

View File

@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetch "libcxx" "15l6bcmwczspbqcq4m2lmzb23g11axr9m8dayn25iys26nn00q43";
src = fetch "libcxx" "052fc91y8084830ajfm8nkc0vghafhnfl7l89b68qsyz3ra93i3l";
postUnpack = ''
unpackFile ${libcxxabi.src}

View File

@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "libc++abi-${version}";
src = fetch "libcxxabi" "1frj1wz780xcwq77icfclnw6q4c8bkkdzkqsrmfjv9963kjylsy5";
src = fetch "libcxxabi" "02z8d0q42wfmnnd0rd1yg2x4y50rfrv1k9rq00a86b6803dc7p45";
buildInputs = [ cmake ] ++ stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;

View File

@ -10,7 +10,7 @@
stdenv.mkDerivation {
name = "lld-${version}";
src = fetch "lld" "0kmyp7iyf4f76wgy87jczkyhvzhlwfydvxgggl74z0x89xgry745";
src = fetch "lld" "00wy4qczh4s6g49sbfmyk21845zx5qc2qpm39bznqz8ynpnh4phc";
buildInputs = [ cmake llvm ];

View File

@ -17,7 +17,7 @@
stdenv.mkDerivation {
name = "lldb-${version}";
src = fetch "lldb" "1qr0ky7llwgjgx1pzkp3pnz32nb6f7lvg8qg6rp5axhgpkx54hz7";
src = fetch "lldb" "14dy1j48nw10w8brkpmla2vjjwfr1mrsl9wfabjfx1j85ywp3h69";
patchPhase = ''
# Fix up various paths that assume llvm and clang are installed in the same place

View File

@ -21,7 +21,7 @@
}:
let
src = fetch "llvm" "0ic3y9gaissi6ixyj9x1c0pq69wfbl2svhprp33av0b58f7wj9v7";
src = fetch "llvm" "1ljb5y5wgypk3sy8zcd5qdgsm5hw8vl7cy6874mbf4gnk9k809b1";
shlib = if stdenv.isDarwin then "dylib" else "so";
# Used when creating a version-suffixed symlink of libLLVM.dylib
@ -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;