rust: track latest LLVM to simplify version bumps

This commit is contained in:
Tristan Ross
2025-09-15 20:33:57 -07:00
committed by Tristan Ross
parent 059414afed
commit deb4234fc1
2 changed files with 9 additions and 12 deletions
+8 -9
View File
@@ -20,8 +20,8 @@
pkgsTargetTarget,
makeRustPlatform,
wrapRustcWith,
llvmPackages_20,
llvm_20,
llvmPackages,
llvm,
wrapCCWith,
overrideCC,
fetchpatch,
@@ -29,7 +29,7 @@
let
llvmSharedFor =
pkgSet:
pkgSet.llvmPackages_20.libllvm.override (
pkgSet.llvmPackages.libllvm.override (
{
enableSharedLibraries = true;
}
@@ -37,7 +37,7 @@ let
# Force LLVM to compile using clang + LLVM libs when targeting pkgsLLVM
stdenv = pkgSet.stdenv.override {
allowedRequisites = null;
cc = pkgSet.pkgsBuildHost.llvmPackages_20.clangUseLLVM;
cc = pkgSet.pkgsBuildHost.llvmPackages.clangUseLLVM;
};
}
);
@@ -51,12 +51,11 @@ import ./default.nix
llvmSharedForHost = llvmSharedFor pkgsBuildHost;
llvmSharedForTarget = llvmSharedFor pkgsBuildTarget;
inherit llvmPackages;
# For use at runtime
llvmShared = llvmSharedFor pkgsHostTarget;
# Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
llvmPackages = llvmPackages_20;
# Note: the version MUST be the same version that we are building. Upstream
# ensures that each released compiler can compile itself:
# https://github.com/NixOS/nixpkgs/pull/351028#issuecomment-2438244363
@@ -87,8 +86,8 @@ import ./default.nix
(
builtins.removeAttrs args [
"llvmPackages_20"
"llvm_20"
"llvmPackages"
"llvm"
"wrapCCWith"
"overrideCC"
"pkgsHostTarget"
+1 -3
View File
@@ -5526,9 +5526,7 @@ with pkgs;
wrapRustcWith = { rustc-unwrapped, ... }@args: callPackage ../build-support/rust/rustc-wrapper args;
wrapRustc = rustc-unwrapped: wrapRustcWith { inherit rustc-unwrapped; };
rust_1_89 = callPackage ../development/compilers/rust/1_89.nix {
llvm_20 = llvmPackages_20.libllvm;
};
rust_1_89 = callPackage ../development/compilers/rust/1_89.nix { };
rust = rust_1_89;
mrustc = callPackage ../development/compilers/mrustc { };