Disable debug in clang+ompss2 compiler
This commit is contained in:
parent
ee5964a984
commit
018bebc264
69
bsc/llvm-ompss2/clang-bad.nix
Normal file
69
bsc/llvm-ompss2/clang-bad.nix
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
stdenv
|
||||||
|
, fetchgit
|
||||||
|
, cmake
|
||||||
|
, lld
|
||||||
|
, bash
|
||||||
|
, python3
|
||||||
|
, perl
|
||||||
|
, clang
|
||||||
|
, which
|
||||||
|
, libelf
|
||||||
|
, libffi
|
||||||
|
, pkg-config
|
||||||
|
, enableDebug ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
version = "11.0.0";
|
||||||
|
pname = "clang-ompss2";
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
isClang = true;
|
||||||
|
isClangWithOmpss = true;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
which
|
||||||
|
clang
|
||||||
|
bash
|
||||||
|
python3
|
||||||
|
perl
|
||||||
|
cmake
|
||||||
|
lld
|
||||||
|
libelf
|
||||||
|
libffi
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
hardeningDisable = [ "fortify" ];
|
||||||
|
|
||||||
|
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;compiler-rt"
|
||||||
|
"-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON"
|
||||||
|
(if enableDebug then "-DLLVM_ENABLE_ASSERTIONS=ON" else "")
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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@bscpm02.bsc.es/llvm-ompss/llvm-mono.git";
|
||||||
|
rev = "e1c73c3691d2685a99d99e14c6110d2c880662c6";
|
||||||
|
ref = "master";
|
||||||
|
};
|
||||||
|
}
|
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||||||
cmakeBuildType = if enableDebug then "Debug" else "Release";
|
cmakeBuildType = if enableDebug then "Debug" else "Release";
|
||||||
|
|
||||||
dontUseCmakeBuildDir = true;
|
dontUseCmakeBuildDir = true;
|
||||||
enableAssertions = "OFF";
|
enableAssertions = if enableDebug then "ON" else "OFF";
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
|
@ -92,6 +92,7 @@ let
|
|||||||
|
|
||||||
clang-ompss2-unwrapped = callPackage ./bsc/llvm-ompss2/clang.nix {
|
clang-ompss2-unwrapped = callPackage ./bsc/llvm-ompss2/clang.nix {
|
||||||
stdenv = pkgs.llvmPackages_10.stdenv;
|
stdenv = pkgs.llvmPackages_10.stdenv;
|
||||||
|
enableDebug = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
clang-ompss2 = callPackage bsc/llvm-ompss2/default.nix {
|
clang-ompss2 = callPackage bsc/llvm-ompss2/default.nix {
|
||||||
|
Loading…
Reference in New Issue
Block a user