mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 19:03:28 +00:00
buildRustPackage: fix cross-compilation to aarch64-unknown-linux-musl
This commit is contained in:
parent
ddf15d321f
commit
08b73c1d58
@ -86,6 +86,10 @@ in stdenv.mkDerivation (args // {
|
||||
${stdenv.lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
|
||||
[target."${stdenv.hostPlatform.config}"]
|
||||
"linker" = "${ccForHost}"
|
||||
${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633
|
||||
stdenv.lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) ''
|
||||
"rustflags" = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ]
|
||||
''}
|
||||
''}
|
||||
EOF
|
||||
cat .cargo/config
|
||||
|
Loading…
Reference in New Issue
Block a user