diff options
author | Yureka <yuka@yuka.dev> | 2024-01-05 00:35:26 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-15 22:34:02 +0100 |
commit | b8076b893eacf2e6bec67453fbf4d421ee28ff03 (patch) | |
tree | e60fe7e3653b31572c33dab3b42fe85c74b04b6b /pkgs/build-support/rust/hooks | |
parent | 7fe20b9162d408d9fa8e3b4303d134b200663547 (diff) |
rust: allow linker to be different from compiler
Diffstat (limited to 'pkgs/build-support/rust/hooks')
-rw-r--r-- | pkgs/build-support/rust/hooks/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix index 7703ff4abad49..874f23fe7ed39 100644 --- a/pkgs/build-support/rust/hooks/default.nix +++ b/pkgs/build-support/rust/hooks/default.nix @@ -66,10 +66,10 @@ cargoConfig = '' [target."${stdenv.buildPlatform.rust.rustcTarget}"] - "linker" = "${rust.envVars.ccForBuild}" + "linker" = "${rust.envVars.linkerForBuild}" ${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) '' [target."${stdenv.hostPlatform.rust.rustcTarget}"] - "linker" = "${rust.envVars.ccForHost}" + "linker" = "${rust.envVars.linkerForHost}" ''} "rustflags" = [ "-C", "target-feature=${if stdenv.hostPlatform.isStatic then "+" else "-"}crt-static" ] ''; |