cargoSetupHook: set crt-static
Tell rust if we want our binaries linked statically or dynamically. Otherwise the compiler will always produce statically linked binaries for musl targets, as this is the default.
This commit is contained in:
parent
66ac47bdf6
commit
51c62063e3
@ -76,6 +76,7 @@ in {
|
||||
[target."${shortTarget}"]
|
||||
"linker" = "${ccForHost}"
|
||||
''}
|
||||
"rustflags" = [ "-C", "target-feature=${if stdenv.hostPlatform.isStatic then "+" else "-"}crt-static" ]
|
||||
'';
|
||||
};
|
||||
} ./cargo-setup-hook.sh) {};
|
||||
|
Loading…
Reference in New Issue
Block a user