Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,13 @@

rust-toolchain = fenix.packages.${system}.fromManifestFile rust-manifest;

rustflags =
if pkgs.stdenv.hostPlatform.rust.rustcTargetSpec == "x86_64-unknown-linux-gnu" then
# Upstream defaults to lld on x86_64-unknown-linux-gnu, we need to use the system linker
"-Clinker-features=-lld -Clink-self-contained=-linker"
else
null;
# Upstream defaults to lld on x86_64-unknown-linux-gnu, we need to use the system linker
rustflags = lib.concatStringsSep " " (
lib.optionals (pkgs.stdenv.hostPlatform.rust.rustcTargetSpec == "x86_64-unknown-linux-gnu") [
"-Clinker-features=-lld"
"-Clink-self-contained=-linker"
]
);

# Crane-based Nix flake configuration.
# Based on https://github.com/ipetkov/crane/blob/master/examples/trunk-workspace/flake.nix
Expand Down