Merge pull request #268812 from Artturin/llvmdedup3
This commit is contained in:
commit
1ea40b20f1
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -20,7 +20,6 @@
|
||||
let
|
||||
release_version = "10.0.1";
|
||||
version = release_version; # differentiating these (variables) is important for RCs
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
|
||||
@ -29,21 +28,7 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, llvm_meta, fetch, fetchpatch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -22,7 +22,6 @@ let
|
||||
candidate = ""; # empty or "rcN"
|
||||
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
||||
version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}-${release_version}${candidate}.src.tar.xz";
|
||||
@ -31,21 +30,7 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "18n1w1hkv931xzq02b34wglbv6zd6sd0r5kb8piwvag7klj7qw3n";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -23,7 +23,6 @@ let
|
||||
candidate = ""; # empty or "rcN"
|
||||
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
||||
version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}-${release_version}${candidate}.src.tar.xz";
|
||||
@ -32,21 +31,7 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "1r9a4fdz9ci58b5z2inwvm4z4cdp6scrivnaw05dggkxz7yrwrb5";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -16,39 +16,51 @@
|
||||
then null
|
||||
else pkgs.bintools
|
||||
, darwin
|
||||
# LLVM release information; specify one of these but not both:
|
||||
, gitRelease ? null
|
||||
# i.e.:
|
||||
# {
|
||||
# version = /* i.e. "15.0.0" */;
|
||||
# rev = /* commit SHA */;
|
||||
# rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
|
||||
# sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
|
||||
# }
|
||||
, officialRelease ? { version = "13.0.1"; sha256 = "06dv6h5dmvzdxbif2s8njki6h32796v368dyb5945x8gjj72xh7k"; }
|
||||
# i.e.:
|
||||
# {
|
||||
# version = /* i.e. "15.0.0" */;
|
||||
# candidate = /* optional; if specified, should be: "rcN" */
|
||||
# sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
|
||||
# }
|
||||
# By default, we'll try to fetch a release from `github:llvm/llvm-project`
|
||||
# corresponding to the `gitRelease` or `officialRelease` specified.
|
||||
#
|
||||
# You can provide your own LLVM source by specifying this arg but then it's up
|
||||
# to you to make sure that the LLVM repo given matches the release configuration
|
||||
# specified.
|
||||
, monorepoSrc ? null
|
||||
|
||||
}:
|
||||
|
||||
assert let
|
||||
int = a: if a then 1 else 0;
|
||||
xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
|
||||
in
|
||||
lib.assertMsg
|
||||
(xor
|
||||
(gitRelease != null)
|
||||
(officialRelease != null))
|
||||
("must specify `gitRelease` or `officialRelease`" +
|
||||
(lib.optionalString (gitRelease != null) " — not both"));
|
||||
let
|
||||
release_version = "13.0.1";
|
||||
candidate = ""; # empty or "rcN"
|
||||
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
||||
rev = ""; # When using a Git commit
|
||||
rev-version = ""; # When using a Git commit
|
||||
version = if rev != "" then rev-version else "${release_version}${dash-candidate}";
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
monorepoSrc' = monorepoSrc;
|
||||
in let
|
||||
# Import releaseInfo separately to avoid infinite recursion
|
||||
inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
|
||||
inherit (releaseInfo) release_version version;
|
||||
inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "llvm-project";
|
||||
rev = if rev != "" then rev else "llvmorg-${version}";
|
||||
sha256 = "06dv6h5dmvzdxbif2s8njki6h32796v368dyb5945x8gjj72xh7k";
|
||||
};
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
src = monorepoSrc;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version src buildLlvmTools; });
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -16,40 +16,48 @@
|
||||
then null
|
||||
else pkgs.bintools
|
||||
, darwin
|
||||
# LLVM release information; specify one of these but not both:
|
||||
, gitRelease ? null
|
||||
# i.e.:
|
||||
# {
|
||||
# version = /* i.e. "15.0.0" */;
|
||||
# rev = /* commit SHA */;
|
||||
# rev-version = /* human readable version; i.e. "unstable-2022-26-07" */;
|
||||
# sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
|
||||
# }
|
||||
, officialRelease ? { version = "14.0.6"; sha256 = "sha256-vffu4HilvYwtzwgq+NlS26m65DGbp6OSSne2aje1yJE="; }
|
||||
# i.e.:
|
||||
# {
|
||||
# version = /* i.e. "15.0.0" */;
|
||||
# candidate = /* optional; if specified, should be: "rcN" */
|
||||
# sha256 = /* checksum for this release, can omit if specifying your own `monorepoSrc` */;
|
||||
# }
|
||||
# By default, we'll try to fetch a release from `github:llvm/llvm-project`
|
||||
# corresponding to the `gitRelease` or `officialRelease` specified.
|
||||
#
|
||||
# You can provide your own LLVM source by specifying this arg but then it's up
|
||||
# to you to make sure that the LLVM repo given matches the release configuration
|
||||
# specified.
|
||||
, monorepoSrc ? null
|
||||
}:
|
||||
|
||||
assert let
|
||||
int = a: if a then 1 else 0;
|
||||
xor = a: b: ((builtins.bitXor (int a) (int b)) == 1);
|
||||
in
|
||||
lib.assertMsg
|
||||
(xor
|
||||
(gitRelease != null)
|
||||
(officialRelease != null))
|
||||
("must specify `gitRelease` or `officialRelease`" +
|
||||
(lib.optionalString (gitRelease != null) " — not both"));
|
||||
let
|
||||
release_version = "14.0.6";
|
||||
candidate = ""; # empty or "rcN"
|
||||
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
|
||||
rev = ""; # When using a Git commit
|
||||
rev-version = ""; # When using a Git commit
|
||||
version = if rev != "" then rev-version else "${release_version}${dash-candidate}";
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
monorepoSrc = fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "llvm-project";
|
||||
rev = if rev != "" then rev else "llvmorg-${version}";
|
||||
sha256 = "sha256-vffu4HilvYwtzwgq+NlS26m65DGbp6OSSne2aje1yJE=";
|
||||
};
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.m68k ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
monorepoSrc' = monorepoSrc;
|
||||
in let
|
||||
# Import releaseInfo separately to avoid infinite recursion
|
||||
inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
|
||||
inherit (releaseInfo) release_version version;
|
||||
inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
|
||||
|
@ -25,7 +25,7 @@
|
||||
# broken for the armv7l builder
|
||||
, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch
|
||||
, enablePolly ? true
|
||||
} @args:
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
|
@ -9,7 +9,7 @@ let
|
||||
useLLVM = stdenv.hostPlatform.useLLVM or false;
|
||||
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
|
||||
haveLibc = stdenv.cc.libc != null;
|
||||
inherit (stdenv.hostPlatform) isMusl isGnu;
|
||||
inherit (stdenv.hostPlatform) isMusl;
|
||||
|
||||
baseName = "compiler-rt";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, stdenvNoCC, cmake, ninja
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -54,51 +54,10 @@ in
|
||||
let
|
||||
monorepoSrc' = monorepoSrc;
|
||||
in let
|
||||
releaseInfo = if gitRelease != null then rec {
|
||||
original = gitRelease;
|
||||
release_version = original.version;
|
||||
version = gitRelease.rev-version;
|
||||
} else rec {
|
||||
original = officialRelease;
|
||||
release_version = original.version;
|
||||
version = if original ? candidate then
|
||||
"${release_version}-${original.candidate}"
|
||||
else
|
||||
release_version;
|
||||
};
|
||||
|
||||
monorepoSrc = if monorepoSrc' != null then
|
||||
monorepoSrc'
|
||||
else let
|
||||
sha256 = releaseInfo.original.sha256;
|
||||
rev = if gitRelease != null then
|
||||
gitRelease.rev
|
||||
else
|
||||
"llvmorg-${releaseInfo.version}";
|
||||
in fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "llvm-project";
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
# Import releaseInfo separately to avoid infinite recursion
|
||||
inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
|
||||
inherit (releaseInfo) release_version version;
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.m68k ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
|
||||
|
@ -30,7 +30,7 @@
|
||||
# broken for the armv7l builder
|
||||
&& !stdenv.hostPlatform.isAarch
|
||||
, enablePolly ? true
|
||||
} @args:
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lib, stdenv, llvm_meta
|
||||
, monorepoSrc, runCommand
|
||||
, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
|
||||
, cmake, ninja, libxml2, libllvm, version, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
|
@ -10,7 +10,7 @@ let
|
||||
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
|
||||
haveLibc = stdenv.cc.libc != null;
|
||||
isDarwinStatic = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isStatic;
|
||||
inherit (stdenv.hostPlatform) isMusl isGnu;
|
||||
inherit (stdenv.hostPlatform) isMusl;
|
||||
|
||||
baseName = "compiler-rt";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, stdenvNoCC, cmake, ninja
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -54,51 +54,10 @@ in
|
||||
let
|
||||
monorepoSrc' = monorepoSrc;
|
||||
in let
|
||||
releaseInfo = if gitRelease != null then rec {
|
||||
original = gitRelease;
|
||||
release_version = original.version;
|
||||
version = gitRelease.rev-version;
|
||||
} else rec {
|
||||
original = officialRelease;
|
||||
release_version = original.version;
|
||||
version = if original ? candidate then
|
||||
"${release_version}-${original.candidate}"
|
||||
else
|
||||
release_version;
|
||||
};
|
||||
|
||||
monorepoSrc = if monorepoSrc' != null then
|
||||
monorepoSrc'
|
||||
else let
|
||||
sha256 = releaseInfo.original.sha256;
|
||||
rev = if gitRelease != null then
|
||||
gitRelease.rev
|
||||
else
|
||||
"llvmorg-${releaseInfo.version}";
|
||||
in fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "llvm-project";
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
# Import releaseInfo separately to avoid infinite recursion
|
||||
inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
|
||||
inherit (releaseInfo) release_version version;
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.m68k ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
|
||||
|
@ -2,7 +2,6 @@
|
||||
, pkgsBuildBuild
|
||||
, monorepoSrc
|
||||
, runCommand
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, darwin
|
||||
, ninja
|
||||
@ -31,7 +30,7 @@
|
||||
# broken for the armv7l builder
|
||||
&& !stdenv.hostPlatform.isAarch
|
||||
, enablePolly ? true
|
||||
} @args:
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
, targetLlvm
|
||||
@ -8,7 +7,6 @@
|
||||
let
|
||||
release_version = "6.0.1";
|
||||
version = release_version; # differentiating these is important for rc's
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
|
||||
@ -17,20 +15,7 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "1w8ml7fyn4vyxmy59n2qm4r1k1kgwgwkaldp6m45fdv4g0kkfbhd";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -20,7 +20,6 @@
|
||||
let
|
||||
release_version = "7.1.0";
|
||||
version = release_version; # differentiating these is important for rc's
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
|
||||
@ -29,21 +28,7 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "0lb4kdh7j2fhfz8kd6iv5df7m3pikiryk1vvwsf87spc90n09q0w";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -20,7 +20,6 @@
|
||||
let
|
||||
release_version = "8.0.1";
|
||||
version = release_version; # differentiating these is important for rc's
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
|
||||
@ -29,21 +28,7 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -20,7 +20,6 @@
|
||||
let
|
||||
release_version = "9.0.1";
|
||||
version = release_version; # differentiating these is important for rc's
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
|
||||
fetch = name: sha256: fetchurl {
|
||||
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
|
||||
@ -29,21 +28,7 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "01vgzd4k1q93nfs8gyl83mjlc4x0qsgfqw32lacbjzdxg0mdfvxj";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib release_version; }) llvm_meta;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
60
pkgs/development/compilers/llvm/common/common-let.nix
Normal file
60
pkgs/development/compilers/llvm/common/common-let.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{ lib
|
||||
, fetchFromGitHub ? null
|
||||
, release_version ? null
|
||||
, gitRelease ? null
|
||||
, officialRelease ? null
|
||||
, monorepoSrc' ? null
|
||||
}:
|
||||
|
||||
rec {
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86 ++
|
||||
lib.optionals (lib.versionAtLeast release_version "7") lib.platforms.riscv ++
|
||||
lib.optionals (lib.versionAtLeast release_version "14") lib.platforms.m68k;
|
||||
};
|
||||
|
||||
releaseInfo =
|
||||
if gitRelease != null then rec {
|
||||
original = gitRelease;
|
||||
release_version = original.version;
|
||||
version = gitRelease.rev-version;
|
||||
} else rec {
|
||||
original = officialRelease;
|
||||
release_version = original.version;
|
||||
version =
|
||||
if original ? candidate then
|
||||
"${release_version}-${original.candidate}"
|
||||
else
|
||||
release_version;
|
||||
};
|
||||
|
||||
monorepoSrc =
|
||||
if monorepoSrc' != null then
|
||||
monorepoSrc'
|
||||
else
|
||||
let
|
||||
sha256 = releaseInfo.original.sha256;
|
||||
rev =
|
||||
if gitRelease != null then
|
||||
gitRelease.rev
|
||||
else
|
||||
"llvmorg-${releaseInfo.version}";
|
||||
in
|
||||
fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "llvm-project";
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||
, gccForLibs, preLibcCrossHeaders
|
||||
, preLibcCrossHeaders
|
||||
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
@ -53,51 +53,10 @@ in
|
||||
let
|
||||
monorepoSrc' = monorepoSrc;
|
||||
in let
|
||||
releaseInfo = if gitRelease != null then rec {
|
||||
original = gitRelease;
|
||||
release_version = original.version;
|
||||
version = gitRelease.rev-version;
|
||||
} else rec {
|
||||
original = officialRelease;
|
||||
release_version = original.version;
|
||||
version = if original ? candidate then
|
||||
"${release_version}-${original.candidate}"
|
||||
else
|
||||
release_version;
|
||||
};
|
||||
|
||||
monorepoSrc = if monorepoSrc' != null then
|
||||
monorepoSrc'
|
||||
else let
|
||||
sha256 = releaseInfo.original.sha256;
|
||||
rev = if gitRelease != null then
|
||||
gitRelease.rev
|
||||
else
|
||||
"llvmorg-${releaseInfo.version}";
|
||||
in fetchFromGitHub {
|
||||
owner = "llvm";
|
||||
repo = "llvm-project";
|
||||
inherit rev sha256;
|
||||
};
|
||||
|
||||
# Import releaseInfo separately to avoid infinite recursion
|
||||
inherit (import ../common/common-let.nix { inherit lib gitRelease officialRelease; }) releaseInfo;
|
||||
inherit (releaseInfo) release_version version;
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = lib.teams.llvm.members;
|
||||
|
||||
# See llvm/cmake/config-ix.cmake.
|
||||
platforms =
|
||||
lib.platforms.aarch64 ++
|
||||
lib.platforms.arm ++
|
||||
lib.platforms.m68k ++
|
||||
lib.platforms.mips ++
|
||||
lib.platforms.power ++
|
||||
lib.platforms.riscv ++
|
||||
lib.platforms.s390x ++
|
||||
lib.platforms.wasi ++
|
||||
lib.platforms.x86;
|
||||
};
|
||||
inherit (import ../common/common-let.nix { inherit lib fetchFromGitHub release_version gitRelease officialRelease monorepoSrc'; }) llvm_meta monorepoSrc;
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake ninja libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
|
||||
|
@ -29,7 +29,7 @@
|
||||
# broken for the armv7l builder
|
||||
&& !stdenv.hostPlatform.isAarch
|
||||
, enablePolly ? true
|
||||
} @args:
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
|
Loading…
Reference in New Issue
Block a user