Add clang with nosv-powered OpenMP
Reviewed-By: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
This commit is contained in:
parent
ebeb2ff549
commit
bb1de835f7
@ -14,7 +14,9 @@ let
|
||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||
clangOmpss2Nanos6 = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nanos6; };
|
||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; };
|
||||
clangOmpss2OpenmpNodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; clangOmpss2Unwrapped = final.clangOmpss2OpenmpUnwrapped; };
|
||||
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
||||
clangOmpss2OpenmpUnwrapped = callPackage ./pkgs/llvm-ompss2/openmp.nix { clangOmpss2Unwrapped = final.clangOmpss2Unwrapped; };
|
||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
||||
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
||||
@ -38,6 +40,7 @@ let
|
||||
stdenvClangOmpss2 = final.stdenv.override { cc = final.clangOmpss2; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nodes = final.stdenv.override { cc = final.clangOmpss2Nodes; allowedRequisites = null; };
|
||||
stdenvClangOmpss2OpenmpNodes = final.stdenv.override { cc = final.clangOmpss2OpenmpNodes; allowedRequisites = null; };
|
||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
llvmPackages_latest
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, bash
|
||||
@ -9,22 +10,43 @@
|
||||
, elfutils
|
||||
, libffi
|
||||
, zlib
|
||||
, nosv
|
||||
, pkg-config
|
||||
, enableDebug ? false
|
||||
, enableNosv ? false
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm03.bsc.es/llvm-ompss/llvm-mono.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "8d106db69c02fb6ec10baedc47b76f068b419d4a"
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv = llvmPackages_latest.stdenv;
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "2023.05.1";
|
||||
pname = "clang-ompss2";
|
||||
|
||||
release = rec {
|
||||
version = "2023.05.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "llvm";
|
||||
rev = "refs/tags/github-release-${version}";
|
||||
sha256 = "sha256-NB/27F1ZRJf6MXFQjinT2gCsoPbEZYlBMhd3uKcK2GM=";
|
||||
};
|
||||
};
|
||||
|
||||
git = rec {
|
||||
version = src.shortRev;
|
||||
src = builtins.fetchGit {
|
||||
url = gitUrl;
|
||||
ref = gitBranch;
|
||||
rev = gitCommit;
|
||||
};
|
||||
};
|
||||
|
||||
source = if (useGit) then git else release;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "clang-ompss2";
|
||||
inherit (source) src version;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
isClang = true;
|
||||
@ -49,6 +71,8 @@ in stdenv.mkDerivation rec {
|
||||
libffi
|
||||
pkg-config
|
||||
zlib
|
||||
] ++ lib.optionals enableNosv [
|
||||
nosv
|
||||
];
|
||||
|
||||
# Error with -D_FORTIFY_SOURCE=2, see https://bugs.gentoo.org/636604:
|
||||
@ -86,6 +110,9 @@ in stdenv.mkDerivation rec {
|
||||
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
||||
"-DLLVM_ENABLE_LIBXML2=OFF"
|
||||
'' + (lib.optionalString enableNosv ''
|
||||
"-DCLANG_DEFAULT_NOSV_HOME=${nosv}"
|
||||
'') + ''
|
||||
# Set the rpath to include external libraries (zlib) both on build and
|
||||
# install
|
||||
"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON"
|
||||
|
8
pkgs/llvm-ompss2/openmp.nix
Normal file
8
pkgs/llvm-ompss2/openmp.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{clangOmpss2Unwrapped}:
|
||||
|
||||
clangOmpss2Unwrapped.override {
|
||||
useGit = true;
|
||||
enableNosv = true;
|
||||
gitBranch = "nos-v-v2.1";
|
||||
gitCommit = "03bdfef9c264afdbee9f0a6cef32a66d976ef758";
|
||||
}
|
Loading…
Reference in New Issue
Block a user