use mold & clang for linking rust in global cargo config

This commit is contained in:
janis 2026-10-10 16:18:06 +02:00
parent ee29e3a56a
commit c5df6d6bba
Signed by: janis
SSH key fingerprint: SHA256:bB1qbbqmDXZNT0KKD5c2Dfjg53JGhj7B3CFcLIzSqq8

View file

@ -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",