mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-07 21:43:51 +00:00
meta: build with Mold linker on x86_64 Linux
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Id51e62dda1ec2ba895ffdbbd25c2f1256a6a6964
This commit is contained in:
parent
7683e6dfcf
commit
3ad14a95a6
2 changed files with 12 additions and 4 deletions
4
.cargo/config.toml
Normal file
4
.cargo/config.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
# https://github.com/rui314/mold?tab=readme-ov-file#how-to-use
|
||||||
|
[target.'cfg(target_os = "linux")']
|
||||||
|
linker = "clang"
|
||||||
|
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
||||||
|
|
@ -1,27 +1,31 @@
|
||||||
{
|
{
|
||||||
mkShell,
|
mkShell,
|
||||||
|
cargo,
|
||||||
|
rustc,
|
||||||
|
mold,
|
||||||
|
clang,
|
||||||
rust-analyzer-unwrapped,
|
rust-analyzer-unwrapped,
|
||||||
rustfmt,
|
rustfmt,
|
||||||
clippy,
|
clippy,
|
||||||
cargo,
|
|
||||||
taplo,
|
taplo,
|
||||||
rustc,
|
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
gnuplot,
|
gnuplot,
|
||||||
}:
|
}:
|
||||||
mkShell {
|
mkShell {
|
||||||
|
name = "microfetch";
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cargo
|
cargo
|
||||||
rustc
|
rustc
|
||||||
|
mold
|
||||||
|
clang
|
||||||
|
|
||||||
rust-analyzer-unwrapped
|
rust-analyzer-unwrapped
|
||||||
(rustfmt.override {asNightly = true;})
|
(rustfmt.override {asNightly = true;})
|
||||||
clippy
|
clippy
|
||||||
taplo
|
taplo
|
||||||
|
|
||||||
gnuplot # For Criterion.rs plots
|
gnuplot # for Criterion.rs plots
|
||||||
];
|
];
|
||||||
|
|
||||||
env.RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
|
env.RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue