From 688029428bc954ab6b4362ac4027ae2e54f464f9 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 4 Aug 2023 17:23:35 -0500 Subject: [PATCH] backout of commit e212e10deee96878236c12a565d99abcc18d2fcb Summary: mold apparently breaks linking to several external libraries, meaning that the `jj` binary is useless as it can't load e.g. `libgit2.so` -- but somehow I didn't catch it. Backout until a solution can be pinpointed. We can at least give off a sigh of relief knowing that our link times aren't too bad yet. Signed-off-by: Austin Seipp Change-Id: I6e1851c339ddc72d32c201a44a7ddc49 --- flake.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 7e0da5bdf..49dcd9056 100644 --- a/flake.nix +++ b/flake.nix @@ -34,7 +34,7 @@ in pkgs.lib.all (re: builtins.match re relPath == null) regexes; }; - + rust-version = pkgs.rust-bin.stable."1.71.0".default; ourRustPlatform = pkgs.makeRustPlatform { @@ -42,10 +42,6 @@ cargo = rust-version; }; - # NOTE (aseipp): on Linux, go ahead and use mold by default to improve - # link times a bit; mostly useful for debug build speed, but will help - # over time if we ever get more dependencies, too - useMoldLinker = pkgs.stdenv.isLinux; in { packages = { @@ -132,16 +128,12 @@ cargo-insta cargo-nextest cargo-watch - - # Extra, more specific tools follow - ] ++ pkgs.lib.optionals useMoldLinker [ mold ]; + ]; shellHook = '' export RUST_BACKTRACE=1 export ZSTD_SYS_USE_PKG_CONFIG=1 export LIBSSH2_SYS_USE_PKG_CONFIG=1 - '' + pkgs.lib.optionalString useMoldLinker '' - export RUSTFLAGS="-C link-arg=-fuse-ld=mold $RUSTFLAGS" ''; }; }));