mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 20:02:14 +03:00
rustc: Expose llvmPackages set used to build rustc
Reusing the same llvmPackages version used for building rustc is required for LTO in Firefox.
This commit is contained in:
parent
3f9b49e0ec
commit
c28e3f9d00
@ -32,6 +32,9 @@ import ./default.nix {
|
||||
# For use at runtime
|
||||
llvmShared = llvm_12.override { enableSharedLibraries = true; };
|
||||
|
||||
# Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
|
||||
llvmPackagesForBuild = pkgsBuildBuild.llvmPackages_12;
|
||||
|
||||
# Note: the version MUST be one version prior to the version we're
|
||||
# building
|
||||
bootstrapVersion = "1.54.0";
|
||||
|
@ -10,6 +10,7 @@
|
||||
, llvmSharedForBuild
|
||||
, llvmSharedForHost
|
||||
, llvmSharedForTarget
|
||||
, llvmPackagesForBuild # Exposed through rustc for LTO in Firefox
|
||||
}:
|
||||
{ stdenv, lib
|
||||
, buildPackages
|
||||
@ -85,7 +86,7 @@
|
||||
version = rustcVersion;
|
||||
sha256 = rustcSha256;
|
||||
inherit enableRustcDev;
|
||||
inherit llvmShared llvmSharedForBuild llvmSharedForHost llvmSharedForTarget;
|
||||
inherit llvmShared llvmSharedForBuild llvmSharedForHost llvmSharedForTarget llvmPackagesForBuild;
|
||||
|
||||
patches = rustcPatches;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
|
||||
, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget
|
||||
, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget, llvmPackagesForBuild
|
||||
, fetchurl, file, python3
|
||||
, darwin, cmake, rust, rustPlatform
|
||||
, pkg-config, openssl
|
||||
@ -174,7 +174,10 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
|
||||
passthru.llvm = llvmShared;
|
||||
passthru = {
|
||||
llvm = llvmShared;
|
||||
llvmPackages = llvmPackagesForBuild;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.rust-lang.org/";
|
||||
|
Loading…
Reference in New Issue
Block a user