Skip to content

Commit 3ad14a9

Browse files
committed
meta: build with Mold linker on x86_64 Linux
Signed-off-by: NotAShelf <[email protected]> Change-Id: Id51e62dda1ec2ba895ffdbbd25c2f1256a6a6964
1 parent 7683e6d commit 3ad14a9

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.cargo/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# https://github.com/rui314/mold?tab=readme-ov-file#how-to-use
2+
[target.'cfg(target_os = "linux")']
3+
linker = "clang"
4+
rustflags = ["-C", "link-arg=-fuse-ld=mold"]

nix/shell.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
{
22
mkShell,
3+
cargo,
4+
rustc,
5+
mold,
6+
clang,
37
rust-analyzer-unwrapped,
48
rustfmt,
59
clippy,
6-
cargo,
710
taplo,
8-
rustc,
911
rustPlatform,
1012
gnuplot,
1113
}:
1214
mkShell {
15+
name = "microfetch";
1316
strictDeps = true;
14-
1517
nativeBuildInputs = [
1618
cargo
1719
rustc
20+
mold
21+
clang
1822

1923
rust-analyzer-unwrapped
2024
(rustfmt.override {asNightly = true;})
2125
clippy
2226
taplo
2327

24-
gnuplot # For Criterion.rs plots
28+
gnuplot # for Criterion.rs plots
2529
];
2630

2731
env.RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";

0 commit comments

Comments
 (0)