Skip to content

Commit

Permalink
flake: Use mold for linking in devShell
Browse files Browse the repository at this point in the history
Our `lld` was a bit out of date. Mold seems to be slightly faster
anyways and seems to work well on both Linux & macOS.
  • Loading branch information
the-mikedavis committed Mar 7, 2025
1 parent b6e58c0 commit fab08c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@

# Devshell behavior is preserved.
devShells.default = let
commonRustFlagsEnv = "-C link-arg=-fuse-ld=lld -C target-cpu=native --cfg tokio_unstable";
commonRustFlagsEnv = "-C link-arg=-fuse-ld=mold -C target-cpu=native --cfg tokio_unstable";
platformRustFlagsEnv = pkgs.lib.optionalString pkgs.stdenv.isLinux "-Clink-arg=-Wl,--no-rosegment";
in
pkgs.mkShell
{
inputsFrom = [self.checks.${system}.helix];
nativeBuildInputs = with pkgs;
[
lld_13
mold
cargo-flamegraph
rust-bin.nightly.latest.rust-analyzer
]
Expand Down

0 comments on commit fab08c0

Please sign in to comment.