Export the runtime home for clang if given
This commit is contained in:
parent
51dcc6896e
commit
552ebdbede
@ -1,13 +1,17 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
|
, lib
|
||||||
, gcc
|
, gcc
|
||||||
, clangOmpss2Unwrapped
|
, clangOmpss2Unwrapped
|
||||||
, wrapCCWith
|
, wrapCCWith
|
||||||
, llvmPackages_latest
|
, llvmPackages_latest
|
||||||
|
, ompss2rt ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
homevar = if ompss2rt.pname == "nanos6" then "NANOS6_HOME" else "NODES_HOME";
|
||||||
|
rtname = if ompss2rt.pname == "nanos6" then "libnanos6" else "libnodes";
|
||||||
|
|
||||||
# We need to replace the lld linker from bintools with our linker just built,
|
# 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
|
# otherwise we run into incompatibility issues when mixing compiler and linker
|
||||||
@ -39,5 +43,8 @@ in wrapCCWith {
|
|||||||
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
echo "--gcc-toolchain=${gcc}" >> $out/nix-support/cc-cflags
|
||||||
|
|
||||||
wrap clang++ $wrapper $ccPath/clang++
|
wrap clang++ $wrapper $ccPath/clang++
|
||||||
|
'' + lib.optionalString (ompss2rt != null) ''
|
||||||
|
echo "export OMPSS2_RUNTIME=${rtname}" >> $out/nix-support/cc-wrapper-hook
|
||||||
|
echo "export ${homevar}=${ompss2rt}" >> $out/nix-support/cc-wrapper-hook
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user