From 3a56012932c6398cec50c06df6749063a114edb7 Mon Sep 17 00:00:00 2001 From: Vivian Date: Tue, 19 Mar 2024 10:27:04 +0100 Subject: [PATCH] mold in rust --- common/hm-modules/rust.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/hm-modules/rust.nix b/common/hm-modules/rust.nix index f489bd31..5a56c65f 100644 --- a/common/hm-modules/rust.nix +++ b/common/hm-modules/rust.nix @@ -15,6 +15,10 @@ in { [build] rustc-wrapper = "${pkgs.sccache}/bin/sccache" + [target.'cfg(not(target_arch = "mips"))'] + linker = "${pkgs.clang}/bin/clang" + rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"] + [profile.rust-analyzer] inherits = "dev" '';