Proper install phase for llvm-ompss2

This commit is contained in:
Rodrigo 2020-06-11 11:33:29 +02:00
parent 3805eb0ceb
commit ceaf273219

View File

@ -8,26 +8,44 @@
, perl , perl
, clang , clang
, which , which
, libelf
, libffi
, pkg-config
, enableDebug ? false
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "10.0.0"; version = "10.0.0";
name = "llvm-ompss2-${version}"; name = "llvm-ompss2-${version}";
enableParallelBuilding = true; enableParallelBuilding = true;
buildInputs = [ which clang bash python3 perl cmake lld ];
#preConfigure = ''
# ls
# cmakeFlagsArray=(
# "-DCMAKE_C_COMPILER=mpicc"
# "-DCMAKE_CXX_COMPILER=mpic++"
# )
#'';
# FIXME: The setup script installs into /build/source/llvm-install buildInputs = [
configurePhase = '' which
mkdir llvm-build clang
cd llvm-build bash
env bash ../utils/OmpSs/setup-cmake.sh python3
perl
cmake
lld
libelf
libffi
pkg-config
];
cmakeBuildType = if enableDebug then "Debug" else "Release";
dontUseCmakeBuildDir = true;
preConfigure = ''
mkdir -p build
cd build
cmakeDir="../llvm"
cmakeFlagsArray=(
"-DLLVM_ENABLE_LLD=ON"
"-DCMAKE_CXX_FLAGS_DEBUG=-g -ggnu-pubnames"
"-DCMAKE_EXE_LINKER_FLAGS_DEBUG=-Wl,-gdb-index"
"-DLLVM_LIT_ARGS=-sv --xunit-xml-output=xunit.xml"
"-DLLVM_ENABLE_PROJECTS=clang;openmp"
"-DLLVM_INSTALL_UTILS=ON"
"-DLLVM_ENABLE_ASSERTIONS=ON"
)
''; '';
src = builtins.fetchGit { src = builtins.fetchGit {