From 5553ee79a9fe22314ec3b1ece577339797b1a524 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 22 May 2023 19:30:15 +0200 Subject: [PATCH] Populate OMPSS2_RUNTIME in clang --- bsc/llvm-ompss2/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bsc/llvm-ompss2/default.nix b/bsc/llvm-ompss2/default.nix index c613a10..2b4e3d1 100644 --- a/bsc/llvm-ompss2/default.nix +++ b/bsc/llvm-ompss2/default.nix @@ -20,11 +20,8 @@ let bintools = bintools-unwrapped; }; - homevar = if rt.pname == "nanos6" - then - "NANOS6_HOME" - else - "NODES_HOME"; + 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; @@ -48,6 +45,7 @@ in wrapCCWith { # 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++ '';