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:
@@ -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) {};
|
||||
|
||||
Reference in New Issue
Block a user