Export proper OmpSs-2 runtime home variable
This commit is contained in:
parent
a34e619333
commit
3f4f3e1105
@ -1,7 +1,7 @@
|
||||
{
|
||||
stdenv
|
||||
, gcc
|
||||
, nanos6
|
||||
, rt
|
||||
, clangOmpss2Unwrapped
|
||||
, wrapCCWith
|
||||
, llvmPackages
|
||||
@ -20,8 +20,14 @@ let
|
||||
bintools = bintools-unwrapped;
|
||||
};
|
||||
|
||||
homevar = if rt.pname == "nanos6"
|
||||
then
|
||||
"NANOS6_HOME"
|
||||
else
|
||||
"NODES_HOME";
|
||||
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc nanos6;
|
||||
inherit gcc;
|
||||
cc = clangOmpss2Unwrapped;
|
||||
in wrapCCWith {
|
||||
inherit cc bintools;
|
||||
@ -40,8 +46,8 @@ in wrapCCWith {
|
||||
|
||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||
|
||||
echo "# Hack to include NANOS6_HOME" >> $out/nix-support/setup-hook
|
||||
echo "export NANOS6_HOME=${nanos6}" >> $out/nix-support/setup-hook
|
||||
# Setup NANOS6_HOME or NODES_HOME, based on the runtime.
|
||||
echo "export ${homevar}=${rt}" >> $out/nix-support/setup-hook
|
||||
|
||||
wrap clang++ $wrapper $ccPath/clang++
|
||||
'';
|
||||
|
@ -105,12 +105,14 @@ let
|
||||
|
||||
clangOmpss2 = appendPasstru (
|
||||
callPackage ./bsc/llvm-ompss2/default.nix {
|
||||
rt = bsc.nanos6;
|
||||
llvmPackages = bsc.llvmPackages;
|
||||
clangOmpss2Unwrapped = bsc.clangOmpss2Unwrapped;
|
||||
}) { CC = "clang"; CXX = "clang++"; };
|
||||
|
||||
clangOmpss2Git = appendPasstru (
|
||||
callPackage ./bsc/llvm-ompss2/default.nix {
|
||||
rt = bsc.nanos6;
|
||||
llvmPackages = bsc.llvmPackages;
|
||||
clangOmpss2Unwrapped = bsc.clangOmpss2UnwrappedGit;
|
||||
}) { CC = "clang"; CXX = "clang++"; };
|
||||
@ -121,7 +123,7 @@ let
|
||||
};
|
||||
|
||||
clangNodes = bsc.clangOmpss2.override {
|
||||
nanos6 = bsc.nodes;
|
||||
rt = bsc.nodes;
|
||||
};
|
||||
stdenvClangNodes = self.stdenv.override {
|
||||
cc = bsc.clangNodes;
|
||||
|
Loading…
Reference in New Issue
Block a user