From c067464bff1f9ff95bc71c1f2a1908d693315db6 Mon Sep 17 00:00:00 2001 From: popcnt <142196625+popcnt1@users.noreply.github.com> Date: Sun, 29 Dec 2024 01:33:07 +0800 Subject: [PATCH] feat(build): add optdev profile for optimized debug builds (#3119) Added a new `optdev` profile in Cargo.toml inheriting from `release`. This profile disables LTO and sets codegen-units to 16 for faster, optimized debug builds. --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 1f8f6afbf8..cf41ed2bde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -405,3 +405,8 @@ codegen-units = 1 # Help to achieve a better result with lto [profile.bench] inherits = "release" #debug = true + +[profile.optdev] +inherits = "release" +lto = "off" +codegen-units = 16