mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
darwin: expose bootstrapLlvmVersion as argument in the stdenv
This enables the bootstrap stdenv test to specify the actual llvm of the newly generated build instread of assuming it's the same version as the current stdenv.
This commit is contained in:
parent
181d764372
commit
40ffedfb38
@ -4,6 +4,7 @@
|
||||
, config
|
||||
, overlays
|
||||
, crossOverlays ? [ ]
|
||||
, bootstrapLlvmVersion ? if localSystem.isAarch64 then "11.1.0" else "7.1.0"
|
||||
# Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
|
||||
, bootstrapFiles ? if localSystem.isAarch64 then
|
||||
let
|
||||
@ -40,14 +41,11 @@ assert crossSystem == localSystem;
|
||||
let
|
||||
inherit (localSystem) system;
|
||||
|
||||
# Bootstrap version needs to be known to reference headers included in the bootstrap tools
|
||||
bootstrapLlvmVersion = if localSystem.isAarch64 then "11.1.0" else "7.1.0";
|
||||
|
||||
useAppleSDKLibs = localSystem.isAarch64;
|
||||
haveKRB5 = localSystem.isx86_64;
|
||||
|
||||
# final toolchain is injected into llvmPackages_${finalLlvmVersion}
|
||||
finalLlvmVersion = if localSystem.isAarch64 then "11" else "7";
|
||||
finalLlvmVersion = lib.versions.major bootstrapLlvmVersion;
|
||||
finalLlvmPackages = "llvmPackages_${finalLlvmVersion}";
|
||||
|
||||
commonImpureHostDeps = [
|
||||
|
@ -254,6 +254,8 @@ in rec {
|
||||
'';
|
||||
};
|
||||
|
||||
bootstrapLlvmVersion = llvmPackages.llvm.version;
|
||||
|
||||
bootstrapFiles = {
|
||||
sh = "${build}/on-server/sh";
|
||||
bzip2 = "${build}/on-server/bzip2";
|
||||
@ -408,7 +410,7 @@ in rec {
|
||||
system = if crossSystem != null then crossSystem else system;
|
||||
|
||||
stdenvStages = args: let
|
||||
args' = args // { inherit bootstrapFiles; };
|
||||
args' = args // { inherit bootstrapLlvmVersion bootstrapFiles; };
|
||||
in (import (test-pkgspath + "/pkgs/stdenv/darwin") args').stagesDarwin;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user