clangOmpss2: merge both nix files into one
Add clangOmpss2Git to the overlay overriding the src attribute of the release nix derivation, so we only keep one derivation for both variants.
This commit is contained in:
parent
a2195aef43
commit
df7c79f34b
@ -1,79 +0,0 @@
|
|||||||
{
|
|
||||||
stdenv
|
|
||||||
, fetchgit
|
|
||||||
, cmake
|
|
||||||
, lld
|
|
||||||
, bash
|
|
||||||
, python3
|
|
||||||
, perl
|
|
||||||
, which
|
|
||||||
, libelf
|
|
||||||
, libffi
|
|
||||||
, pkg-config
|
|
||||||
, enableDebug ? true
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
version = "${src.shortRev}";
|
|
||||||
pname = "clang-ompss2";
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
isClang = true;
|
|
||||||
#isGNU = true;
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
CC = "clang";
|
|
||||||
CXX = "clang++";
|
|
||||||
};
|
|
||||||
|
|
||||||
isClangWithOmpss = true;
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
which
|
|
||||||
bash
|
|
||||||
python3
|
|
||||||
perl
|
|
||||||
cmake
|
|
||||||
lld
|
|
||||||
libelf
|
|
||||||
libffi
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
|
|
||||||
hardeningDisable = [ "fortify" ];
|
|
||||||
|
|
||||||
cmakeBuildType = if enableDebug then "Debug" else "Release";
|
|
||||||
|
|
||||||
dontUseCmakeBuildDir = true;
|
|
||||||
enableAssertions = if enableDebug then "ON" else "OFF";
|
|
||||||
|
|
||||||
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;compiler-rt"
|
|
||||||
"-DLLVM_ENABLE_ASSERTIONS=${enableAssertions}"
|
|
||||||
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Remove support for GNU and Intel Openmp
|
|
||||||
postInstall = ''
|
|
||||||
rm $out/lib/libgomp*
|
|
||||||
rm $out/lib/libiomp*
|
|
||||||
'';
|
|
||||||
|
|
||||||
# About "-DCLANG_DEFAULT_NANOS6_HOME=${nanos6}", we could specify a default
|
|
||||||
# nanos6 installation, but this is would require a recompilation of clang each
|
|
||||||
# time nanos6 is changed. Better to use the environment variable NANOS6_HOME,
|
|
||||||
# and specify nanos6 at run time.
|
|
||||||
|
|
||||||
src = builtins.fetchGit {
|
|
||||||
url = "ssh://git@bscpm03.bsc.es/llvm-ompss/llvm-mono.git";
|
|
||||||
ref = "master";
|
|
||||||
};
|
|
||||||
}
|
|
13
overlay.nix
13
overlay.nix
@ -61,11 +61,24 @@ let
|
|||||||
stdenv = bsc.llvmPackages.stdenv;
|
stdenv = bsc.llvmPackages.stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
clangOmpss2UnwrappedGit = bsc.clangOmpss2Unwrapped.overrideAttrs (old: rec {
|
||||||
|
src = builtins.fetchGit {
|
||||||
|
url = "ssh://git@bscpm03.bsc.es/llvm-ompss/llvm-mono.git";
|
||||||
|
ref = "master";
|
||||||
|
};
|
||||||
|
version = src.shortRev;
|
||||||
|
});
|
||||||
|
|
||||||
clangOmpss2 = appendPasstru (
|
clangOmpss2 = appendPasstru (
|
||||||
callPackage ./bsc/llvm-ompss2/default.nix {
|
callPackage ./bsc/llvm-ompss2/default.nix {
|
||||||
clangOmpss2Unwrapped = bsc.clangOmpss2Unwrapped;
|
clangOmpss2Unwrapped = bsc.clangOmpss2Unwrapped;
|
||||||
}) { CC = "clang"; CXX = "clang++"; };
|
}) { CC = "clang"; CXX = "clang++"; };
|
||||||
|
|
||||||
|
clangOmpss2Git = appendPasstru (
|
||||||
|
callPackage ./bsc/llvm-ompss2/default.nix {
|
||||||
|
clangOmpss2Unwrapped = bsc.clangOmpss2UnwrappedGit;
|
||||||
|
}) { CC = "clang"; CXX = "clang++"; };
|
||||||
|
|
||||||
mcxx = bsc.mcxxRelease;
|
mcxx = bsc.mcxxRelease;
|
||||||
mcxxRelease = callPackage ./bsc/mcxx/default.nix { };
|
mcxxRelease = callPackage ./bsc/mcxx/default.nix { };
|
||||||
mcxxGit = callPackage ./bsc/mcxx/git.nix { };
|
mcxxGit = callPackage ./bsc/mcxx/git.nix { };
|
||||||
|
Loading…
Reference in New Issue
Block a user