aboutsummaryrefslogtreecommitdiff
path: root/Cargo.nix
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-02-08 10:36:49 +0000
committerAlex <alex@adnab.me>2024-02-08 10:36:49 +0000
commit3a49f860731cfe1ba9924a0041b78456af9565a4 (patch)
tree68bf4ad030331f2483fa0f132daa1bc3f81bd177 /Cargo.nix
parent59930977e074a78adaf43f9933612dae835804cf (diff)
parent2b92e8d7c6bcfaec7d9b8457d9a7e88aa85ee268 (diff)
downloadgarage-3a49f860731cfe1ba9924a0041b78456af9565a4.tar.gz
garage-3a49f860731cfe1ba9924a0041b78456af9565a4.zip
Merge pull request 'Enable LTO for release builds using Nix' (#707) from lto-nix into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/707
Diffstat (limited to 'Cargo.nix')
-rw-r--r--Cargo.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cargo.nix b/Cargo.nix
index 86a20104..c4d4c0ea 100644
--- a/Cargo.nix
+++ b/Cargo.nix
@@ -45,7 +45,7 @@ else let
inherit (rustLib) fetchCratesIo fetchCrateLocal fetchCrateGit fetchCrateAlternativeRegistry expandFeatures decideProfile genDrvsByProfile;
profilesByName = {
dev = builtins.fromTOML "lto = \"off\"\n";
- release = builtins.fromTOML "debug = true\n";
+ release = builtins.fromTOML "codegen-units = 1\nlto = true\nopt-level = \"s\"\nstrip = true\n";
};
rootFeatures' = expandFeatures rootFeatures;
overridableMkRustCrate = f: