use mold & clang for linking rust in global cargo config
This commit is contained in:
parent
ee29e3a56a
commit
c5df6d6bba
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
home.packages = [
|
||||
pkgs.unstable.rustup
|
||||
];
|
||||
|
||||
|
|
@ -33,9 +33,9 @@
|
|||
target-dir = "/var/code/rust/.cargo/global-target"
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
linker = "${pkgs.clang}/bin/clang"
|
||||
rustflags = [
|
||||
"-Clink-arg=--ld-path=mold",
|
||||
"-Clink-arg=-fuse-ld=${pkgs.mold}/bin/mold",
|
||||
# Compile faster
|
||||
"-Zshare-generics=y",
|
||||
"-Zthreads=12",
|
||||
|
|
|
|||
Loading…
Reference in a new issue