rustc: expose correct llvmPackages for cross compile

main
Nick Cao 2 years ago
parent 5c5187646d
commit be29f4575e
No known key found for this signature in database
GPG Key ID: 068A56CEF48FA2C1
  1. 2
      pkgs/development/compilers/rust/1_60.nix
  2. 4
      pkgs/development/compilers/rust/default.nix
  3. 4
      pkgs/development/compilers/rust/rustc.nix

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

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

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

Loading…
Cancel
Save