forked from M-Labs/artiq
1
0
Fork 0

nix: update LLVM and llvmlite, remove clang (not needed for running)

This commit is contained in:
Sebastien Bourdeauducq 2018-08-16 00:33:52 +08:00
parent 0b1ce0ea32
commit 73cf071b1a
3 changed files with 19 additions and 17 deletions

View File

@ -2,21 +2,13 @@
let
llvm-src = fetchFromGitHub {
rev = "ff2fe8c318eb7c934a2f2ac8da61a00d62becf1f";
owner = "openrisc";
rev = "527aa86b578da5dfb9cf4510b71f0f46a11249f7";
owner = "m-labs";
repo = "llvm-or1k";
sha256 = "061pvc4z5i92s1xwz9ir6yqnk5vb0xd8cs9php4yy01dyvpblql7";
};
clang-src = fetchFromGitHub {
rev = "030259ccc14261d02163cce28adb0c11243d0a99";
owner = "openrisc";
repo = "clang-or1k";
sha256 = "1w7dk469svskr1c7ywcl9xsxbnvl40c28nffivpclijcvsh43463";
sha256 = "0lmcg9xj66pf4mb6racipw67vm8kwm84dl861hyqnywd61kvhrwa";
};
in
runCommand "llvm_or1k_src" {}''
mkdir -p $out
mkdir -p $out/tools/clang
cp -r ${llvm-src}/* $out/
cp -r ${clang-src}/* $out/tools/clang
''

View File

@ -18,10 +18,20 @@ stdenv.mkDerivation rec {
'';
cmakeFlags = with stdenv; [
"-DLLVM_TARGETS_TO_BUILD=OR1K;X86"
"-DCMAKE_BUILD_TYPE=Rel"
"-DLLVM_ENABLE_ASSERTIONS=ON"
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_BUILD_LLVM_DYLIB=ON"
"-DLLVM_LINK_LLVM_DYLIB=ON"
"-DLLVM_TARGETS_TO_BUILD=X86"
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=OR1K"
"-DLLVM_ENABLE_ASSERTIONS=OFF"
"-DLLVM_INSTALL_UTILS=ON"
"-DLLVM_INCLUDE_TESTS=OFF"
"-DLLVM_INCLUDE_DOCS=OFF"
"-DLLVM_INCLUDE_EXAMPLES=OFF"
"-DCLANG_ENABLE_ARCMT=OFF"
"-DCLANG_ENABLE_STATIC_ANALYZER=OFF"
"-DCLANG_INCLUDE_TESTS=OFF"
"-DCLANG_INCLUDE_DOCS=OFF"
];
enableParallelBuilding = true;

View File

@ -6,15 +6,15 @@ stdenv.mkDerivation rec {
name = "llvmlite-${version}";
src = fetchgit {
url = "https://github.com/m-labs/llvmlite";
rev = "0f4ebae43c2d2a084deb8b693e3d42a7b2c82222";
sha256 = "0n90w0x001k0zyn8zz6jxc9i78agqv15m55vz2raw1y0rfw16mfl";
rev = "401dfb713166bdd2bc0d3ab2b7ebf12e7a434130";
sha256 = "1ci1pnpspv1pqz712yix1nmplq7568vpsr6gzzl3a33w9s0sw2nq";
leaveDotGit = true;
};
buildInputs = [ makeWrapper python35 ncurses zlib llvm-or1k python35Packages.setuptools ];
installPhase = ''
LLVM_CONFIG=${llvm-or1k}/llvm_or1k/bin/llvm-config
LLVM_CONFIG=${llvm-or1k}/bin/llvm-config
python3 setup.py install --prefix=$out
'';
}