Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions pkgs/development/compilers/llvm/common/openmp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,28 @@ stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
__structuredAttrs = true;
}
''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/openmp "$out"
''
(
''
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/openmp "$out"
''
+ lib.optionalString (lib.versionAtLeast release_version "23") ''
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/third-party "$out"
cp -r ${monorepoSrc}/runtimes "$out"
''
)
else
src;

sourceRoot = "${finalAttrs.src.name}/openmp";
# LLVM 23 removed OpenMP's standalone build
# https://openmp.llvm.org/Building.html
sourceRoot =
"${finalAttrs.src.name}/"
+ (if lib.versionAtLeast release_version "23" then "runtimes" else "openmp");

outputs = [
"out"
Expand Down Expand Up @@ -89,14 +102,19 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeFeature "OPT_TOOL" "${llvm}/bin/opt")
(lib.cmakeFeature "LINK_TOOL" "${llvm}/bin/llvm-link")
]
++ lib.optionals (lib.versionAtLeast release_version "23") [
(lib.cmakeFeature "LLVM_ENABLE_RUNTIMES" "openmp")
]
++ devExtraCmakeFlags;

doCheck = false;

checkTarget = "check-openmp";

preCheck = ''
patchShebangs ../tools/archer/tests/deflake.bash
patchShebangs ${
if lib.versionAtLeast release_version "23" then "../../openmp" else ".."
}/tools/archer/tests/deflake.bash
'';

__structuredAttrs = true;
Expand Down
Loading