llvmPackages_{12,13,14,15,16,17,18,19,20,git}.openmp: move patches out of common
This commit is contained in:
committed by
Alyssa Ross
parent
1a148262f4
commit
946113bbf7
@@ -1090,25 +1090,6 @@ let
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp {
|
||||
patches =
|
||||
lib.optional (
|
||||
lib.versionAtLeast metadata.release_version "15" && lib.versionOlder metadata.release_version "19"
|
||||
) (metadata.getVersionFile "openmp/fix-find-tool.patch")
|
||||
++ lib.optional (
|
||||
lib.versionAtLeast metadata.release_version "14" && lib.versionOlder metadata.release_version "18"
|
||||
) (metadata.getVersionFile "openmp/gnu-install-dirs.patch")
|
||||
++ lib.optional (lib.versionAtLeast metadata.release_version "14") (
|
||||
metadata.getVersionFile "openmp/run-lit-directly.patch"
|
||||
)
|
||||
++
|
||||
lib.optional (lib.versionOlder metadata.release_version "14")
|
||||
# Fix cross.
|
||||
(
|
||||
fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
|
||||
hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (lib.versionAtLeast metadata.release_version "20") {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, release_version
|
||||
, patches ? []
|
||||
, monorepoSrc ? null
|
||||
, src ? null
|
||||
, runCommand
|
||||
@@ -19,6 +18,8 @@
|
||||
, devExtraCmakeFlags ? []
|
||||
, ompdSupport ? true
|
||||
, ompdGdbSupport ? ompdSupport
|
||||
, getVersionFile
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
assert lib.assertMsg (ompdGdbSupport -> ompdSupport) "OMPD GDB support requires OMPD support!";
|
||||
@@ -36,7 +37,7 @@ let
|
||||
'') else src;
|
||||
in
|
||||
stdenv.mkDerivation (rec {
|
||||
inherit pname version patches;
|
||||
inherit pname version;
|
||||
|
||||
src = src';
|
||||
|
||||
@@ -49,6 +50,26 @@ stdenv.mkDerivation (rec {
|
||||
if lib.versionOlder release_version "14" then [ "-p2" ]
|
||||
else null;
|
||||
|
||||
patches =
|
||||
lib.optional (
|
||||
lib.versionAtLeast release_version "15" && lib.versionOlder release_version "19"
|
||||
) (getVersionFile "openmp/fix-find-tool.patch")
|
||||
++ lib.optional (
|
||||
lib.versionAtLeast release_version "14" && lib.versionOlder release_version "18"
|
||||
) (getVersionFile "openmp/gnu-install-dirs.patch")
|
||||
++ lib.optional (lib.versionAtLeast release_version "14") (
|
||||
getVersionFile "openmp/run-lit-directly.patch"
|
||||
)
|
||||
++
|
||||
lib.optional (lib.versionOlder release_version "14")
|
||||
# Fix cross.
|
||||
(
|
||||
fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch";
|
||||
hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A=";
|
||||
}
|
||||
);
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3.pythonOnBuildForHost
|
||||
|
||||
Reference in New Issue
Block a user