forked from rarias/bscpkgs
Begin moving bsc packages to root attribute
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
{
|
||||
stdenv
|
||||
llvmPackages_latest
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, lld
|
||||
, bash
|
||||
, python3
|
||||
, perl
|
||||
@@ -14,7 +13,9 @@
|
||||
, enableDebug ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let
|
||||
stdenv = llvmPackages_latest.stdenv;
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "2023.05.1";
|
||||
pname = "clang-ompss2";
|
||||
|
||||
@@ -43,7 +44,7 @@ stdenv.mkDerivation rec {
|
||||
python3
|
||||
perl
|
||||
cmake
|
||||
lld
|
||||
llvmPackages_latest.lld
|
||||
elfutils
|
||||
libffi
|
||||
pkg-config
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
stdenv
|
||||
, gcc
|
||||
, rt
|
||||
, clangOmpss2Unwrapped
|
||||
, wrapCCWith
|
||||
, llvmPackages
|
||||
, llvmPackages_latest
|
||||
}:
|
||||
|
||||
|
||||
@@ -13,16 +12,12 @@ let
|
||||
# We need to replace the lld linker from bintools with our linker just built,
|
||||
# otherwise we run into incompatibility issues when mixing compiler and linker
|
||||
# versions.
|
||||
bintools-unwrapped = llvmPackages.tools.bintools-unwrapped.override {
|
||||
bintools-unwrapped = llvmPackages_latest.tools.bintools-unwrapped.override {
|
||||
lld = clangOmpss2Unwrapped;
|
||||
};
|
||||
bintools = llvmPackages.tools.bintools.override {
|
||||
bintools = llvmPackages_latest.tools.bintools.override {
|
||||
bintools = bintools-unwrapped;
|
||||
};
|
||||
|
||||
homevar = if rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
||||
rtname = if rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
||||
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc;
|
||||
cc = clangOmpss2Unwrapped;
|
||||
@@ -43,10 +38,6 @@ in wrapCCWith {
|
||||
|
||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||
|
||||
# Setup NANOS6_HOME or NODES_HOME, based on the runtime.
|
||||
echo "export ${homevar}=${rt}" >> $out/nix-support/setup-hook
|
||||
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/setup-hook
|
||||
|
||||
wrap clang++ $wrapper $ccPath/clang++
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
, ovni
|
||||
, enableDebug ? false
|
||||
, enableJemalloc ? true
|
||||
, jemalloc ? null
|
||||
, jemallocNanos6 ? null
|
||||
, cachelineBytes ? 64
|
||||
, enableGlibcxxDebug ? false
|
||||
, useGit ? false
|
||||
@@ -22,7 +22,7 @@
|
||||
, gitCommit ? "58712e669ac02f721fb841247361ea54f53a6a47"
|
||||
}:
|
||||
|
||||
assert enableJemalloc -> (jemalloc != null);
|
||||
assert enableJemalloc -> (jemallocNanos6 != null);
|
||||
|
||||
with lib;
|
||||
|
||||
@@ -73,7 +73,7 @@ in
|
||||
"--enable-ovni-instrumentation"
|
||||
"--with-ovni=${ovni}"
|
||||
] ++
|
||||
(optional enableJemalloc "--with-jemalloc=${jemalloc}") ++
|
||||
(optional enableJemalloc "--with-jemalloc=${jemallocNanos6}") ++
|
||||
(optional enableGlibcxxDebug "CXXFLAGS=-D_GLIBCXX_DEBUG");
|
||||
|
||||
postConfigure = lib.optionalString (!enableDebug) ''
|
||||
@@ -99,4 +99,10 @@ in
|
||||
papi
|
||||
ovni
|
||||
];
|
||||
|
||||
# Create a script that sets NANOS6_HOME
|
||||
postInstall = ''
|
||||
mkdir -p $out/nix-support
|
||||
echo "export NANOS6_HOME=$out" >> $out/nix-support/setup-hook
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ let
|
||||
repo = "ovni";
|
||||
rev = "${version}";
|
||||
sha256 = "sha256-4ulohGnbQwAZ/qnm5bmceoMhTuAHlCfLAWEodZ9YMP0=";
|
||||
};
|
||||
} // { shortRev = "b6903bc4"; };
|
||||
};
|
||||
|
||||
git = rec {
|
||||
@@ -40,5 +40,6 @@ in
|
||||
inherit (source) src version;
|
||||
buildInputs = [ cmake mpi ];
|
||||
cmakeBuildType = if (enableDebug) then "Debug" else "Release";
|
||||
cmakeFlags = [ "-DOVNI_GIT_COMMIT=${src.shortRev}" ];
|
||||
dontStrip = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user