summary refs log tree commit diff
path: root/pkgs/build-support/rust/hooks/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/rust/hooks/default.nix')
-rw-r--r--pkgs/build-support/rust/hooks/default.nix5
1 files changed, 1 insertions, 4 deletions
diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix
index d3369245707..652b074c302 100644
--- a/pkgs/build-support/rust/hooks/default.nix
+++ b/pkgs/build-support/rust/hooks/default.nix
@@ -75,11 +75,8 @@ in {
           ${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
             [target."${shortTarget}"]
             "linker" = "${ccForHost}"
-            ${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633
-            lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) ''
-              "rustflags" = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ]
-            ''}
           ''}
+          "rustflags" = [ "-C", "target-feature=${if stdenv.hostPlatform.isStatic then "+" else "-"}crt-static" ]
         '';
       };
     } ./cargo-setup-hook.sh) {};