mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-24 20:54:15 +00:00
backout of commit e212e10dee
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 <aseipp@pobox.com> Change-Id: I6e1851c339ddc72d32c201a44a7ddc49
This commit is contained in:
parent
4a10ea4e3e
commit
688029428b
1 changed files with 2 additions and 10 deletions
12
flake.nix
12
flake.nix
|
@ -34,7 +34,7 @@
|
||||||
in
|
in
|
||||||
pkgs.lib.all (re: builtins.match re relPath == null) regexes;
|
pkgs.lib.all (re: builtins.match re relPath == null) regexes;
|
||||||
};
|
};
|
||||||
|
|
||||||
rust-version = pkgs.rust-bin.stable."1.71.0".default;
|
rust-version = pkgs.rust-bin.stable."1.71.0".default;
|
||||||
|
|
||||||
ourRustPlatform = pkgs.makeRustPlatform {
|
ourRustPlatform = pkgs.makeRustPlatform {
|
||||||
|
@ -42,10 +42,6 @@
|
||||||
cargo = rust-version;
|
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
|
in
|
||||||
{
|
{
|
||||||
packages = {
|
packages = {
|
||||||
|
@ -132,16 +128,12 @@
|
||||||
cargo-insta
|
cargo-insta
|
||||||
cargo-nextest
|
cargo-nextest
|
||||||
cargo-watch
|
cargo-watch
|
||||||
|
];
|
||||||
# Extra, more specific tools follow
|
|
||||||
] ++ pkgs.lib.optionals useMoldLinker [ mold ];
|
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
export ZSTD_SYS_USE_PKG_CONFIG=1
|
export ZSTD_SYS_USE_PKG_CONFIG=1
|
||||||
export LIBSSH2_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"
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue