From ad34d109511aaf3eda1e666f61fb087fc891456d Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Thu, 4 Apr 2024 01:35:05 -0500 Subject: [PATCH] nix: parallel `rustc` frontend in devShell Only active within `devShell`; the default `.#jujutsu` package is unaffected by this change. This somewhat increases CPU utilization and has a marginal improvement on my local compile times, but it's also nice if you have to recompile from scratch too. Signed-off-by: Austin Seipp Change-Id: I07ab28991843ca3723185569db5f38f2ed076875 --- flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 07288ca88..4a3bdfd93 100644 --- a/flake.nix +++ b/flake.nix @@ -175,8 +175,10 @@ export RUST_BACKTRACE=1 export ZSTD_SYS_USE_PKG_CONFIG=1 export LIBSSH2_SYS_USE_PKG_CONFIG=1 + + export RUSTFLAGS="-Zthreads=0" '' + pkgs.lib.optionalString useMoldLinker '' - export RUSTFLAGS="-C link-arg=-fuse-ld=mold" + export RUSTFLAGS+=" -C link-arg=-fuse-ld=mold" '' + darwinNextestHack; }; }));