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.
launchpad/nixpkgs/master
Daiderd Jordan 3 years ago
parent 181d764372
commit 40ffedfb38
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
  1. 6
      pkgs/stdenv/darwin/default.nix
  2. 4
      pkgs/stdenv/darwin/make-bootstrap-tools.nix

@ -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…
Cancel
Save