2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-27 04:08:27 +08:00
artiq/nix/pkgs/llvm-or1k.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv
, git
, llvm-src
, perl, groff, cmake, libxml2, python, libffi, valgrind
, ...
}:
stdenv.mkDerivation rec {
name = "llvm_or1k";
src = llvm-src;
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;
preBuild = ''
NIX_BUILD_CORES=4
makeFlagsArray=(-j''$NIX_BUILD_CORES)
mkdir -p $out/
'';
cmakeFlags = with stdenv; [
"-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;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3;
2019-01-18 10:28:51 +08:00
maintainers = with stdenv.lib.maintainers; [ sb0 ];
platforms = stdenv.lib.platforms.all;
};
}