diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/rust/lib/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/1_75.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/default.nix | 5 |
3 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/build-support/rust/lib/default.nix b/pkgs/build-support/rust/lib/default.nix index 4958a42fcdd96..e09f913bfbd39 100644 --- a/pkgs/build-support/rust/lib/default.nix +++ b/pkgs/build-support/rust/lib/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , pkgsBuildHost +, pkgsBuildTarget , pkgsTargetTarget }: @@ -24,7 +25,7 @@ rec { cxxForHost = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"; linkerForHost = if shouldUseLLD stdenv.targetPlatform && !stdenv.cc.bintools.isLLVM - then "${pkgsBuildHost.lld}/bin/ld.lld" + then "${pkgsBuildHost.llvmPackages.bintools}/bin/${stdenv.cc.targetPrefix}ld.lld" else ccForHost; # Unfortunately we must use the dangerous `pkgsTargetTarget` here @@ -35,7 +36,7 @@ rec { cxxForTarget = "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}c++"; linkerForTarget = if shouldUseLLD pkgsTargetTarget.stdenv.targetPlatform && !pkgsTargetTarget.stdenv.cc.bintools.isLLVM # whether stdenv's linker is lld already - then "${pkgsBuildHost.lld}/bin/ld.lld" + then "${pkgsBuildTarget.llvmPackages.bintools}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}ld.lld" else ccForTarget; rustBuildPlatform = stdenv.buildPlatform.rust.rustcTarget; diff --git a/pkgs/development/compilers/rust/1_75.nix b/pkgs/development/compilers/rust/1_75.nix index d41a263c8a296..2ca1e2d294bcb 100644 --- a/pkgs/development/compilers/rust/1_75.nix +++ b/pkgs/development/compilers/rust/1_75.nix @@ -56,4 +56,4 @@ import ./default.nix { rustcPatches = [ ]; } -(builtins.removeAttrs args [ "pkgsBuildTarget" "llvmPackages_17" "llvm_17"]) +(builtins.removeAttrs args [ "llvmPackages_17" "llvm_17"]) diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index f00c469cd19c2..31501e668c893 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -16,6 +16,7 @@ , CoreFoundation, Security, SystemConfiguration , pkgsBuildBuild , pkgsBuildHost +, pkgsBuildTarget , pkgsTargetTarget , makeRustPlatform , wrapRustcWith @@ -23,7 +24,9 @@ let # Use `import` to make sure no packages sneak in here. - lib' = import ../../../build-support/rust/lib { inherit lib stdenv pkgsBuildHost pkgsTargetTarget; }; + lib' = import ../../../build-support/rust/lib { + inherit lib stdenv pkgsBuildHost pkgsBuildTarget pkgsTargetTarget; + }; # Allow faster cross compiler generation by reusing Build artifacts fastCross = (stdenv.buildPlatform == stdenv.hostPlatform) && (stdenv.hostPlatform != stdenv.targetPlatform); in |