rustc: expose correct llvmPackages for cross compile

This commit is contained in:
Nick Cao 2021-11-30 14:49:53 +08:00
parent 5c5187646d
commit be29f4575e
No known key found for this signature in database
GPG key ID: 068A56CEF48FA2C1
3 changed files with 5 additions and 5 deletions

View file

@ -33,7 +33,7 @@ import ./default.nix {
llvmShared = llvm_14.override { enableSharedLibraries = true; };
# Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
llvmPackagesForBuild = pkgsBuildBuild.llvmPackages_14;
llvmPackages = llvmPackages_14;
# Note: the version MUST be one version prior to the version we're
# building

View file

@ -10,7 +10,7 @@
, llvmSharedForBuild
, llvmSharedForHost
, llvmSharedForTarget
, llvmPackagesForBuild # Exposed through rustc for LTO in Firefox
, llvmPackages # Exposed through rustc for LTO in Firefox
}:
{ stdenv, lib
, buildPackages
@ -64,7 +64,7 @@ in
version = rustcVersion;
sha256 = rustcSha256;
inherit enableRustcDev;
inherit llvmShared llvmSharedForBuild llvmSharedForHost llvmSharedForTarget llvmPackagesForBuild;
inherit llvmShared llvmSharedForBuild llvmSharedForHost llvmSharedForTarget llvmPackages;
patches = rustcPatches;

View file

@ -1,5 +1,5 @@
{ lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget, llvmPackagesForBuild
, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget, llvmPackages
, fetchurl, file, python3
, darwin, cmake, rust, rustPlatform
, pkg-config, openssl
@ -179,7 +179,7 @@ in stdenv.mkDerivation rec {
passthru = {
llvm = llvmShared;
llvmPackages = llvmPackagesForBuild;
inherit llvmPackages;
};
meta = with lib; {