Merge pull request 'use mold linker when invoking cargo manually (not in nix build scripts)' (#646) from mold-linker into main
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #646
This commit is contained in:
commit
a5e8ffeb63
3 changed files with 18 additions and 11 deletions
3
.cargo/config.toml
Normal file
3
.cargo/config.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[target.x86_64-unknown-linux-gnu]
|
||||||
|
linker = "clang"
|
||||||
|
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
|
@ -48,6 +48,9 @@
|
||||||
pkgsSrc = nixpkgs;
|
pkgsSrc = nixpkgs;
|
||||||
cargo2nixOverlay = cargo2nix.overlays.default;
|
cargo2nixOverlay = cargo2nix.overlays.default;
|
||||||
release = false;
|
release = false;
|
||||||
}).workspaceShell { packages = [ pkgs.rustfmt ]; };
|
}).workspaceShell { packages = with pkgs; [
|
||||||
|
rustfmt
|
||||||
|
mold
|
||||||
|
]; };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
21
shell.nix
21
shell.nix
|
@ -15,16 +15,17 @@ in {
|
||||||
# --- Rust Shell ---
|
# --- Rust Shell ---
|
||||||
# Use it to compile Garage
|
# Use it to compile Garage
|
||||||
rust = pkgs.mkShell {
|
rust = pkgs.mkShell {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = with pkgs; [
|
||||||
#pkgs.rustPlatform.rust.rustc
|
#rustPlatform.rust.rustc
|
||||||
pkgs.rustPlatform.rust.cargo
|
rustPlatform.rust.cargo
|
||||||
#pkgs.clippy
|
mold
|
||||||
pkgs.rustfmt
|
#clippy
|
||||||
#pkgs.perl
|
rustfmt
|
||||||
#pkgs.protobuf
|
#perl
|
||||||
#pkgs.pkg-config
|
#protobuf
|
||||||
#pkgs.openssl
|
#pkg-config
|
||||||
pkgs.file
|
#openssl
|
||||||
|
file
|
||||||
#cargo2nix.packages.x86_64-linux.cargo2nix
|
#cargo2nix.packages.x86_64-linux.cargo2nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue