From a19c43f613b2bd82faafb24bd40d67b5716a93c8 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Tue, 10 Dec 2024 12:47:33 +0100 Subject: [PATCH] rust/Cargo.toml: Change to "thin local" LTO for faster release builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "fat" LTO takes much longer to compile than with "thin local" LTO, so use the Rust release build defaults, which is "thin local" LTO [1-2]. If someone wants to enable "fat" LTO, they can use one of the common methods to adjust the Rust build process, for example: $ cargo build --config 'profile.release.lto=true' --release or $ export CARGO_PROFILE_RELEASE_LTO=true $ cargo build --release [1] https://doc.rust-lang.org/cargo/reference/profiles.html#release [2] https://doc.rust-lang.org/cargo/reference/profiles.html#lto Reviewed-by: Steffen Eiden Acked-by: Jan Höppner Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- rust/Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 08194ca2..b2273cf5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -26,6 +26,3 @@ unstable_features = "warn" unused = "warn" unused_import_braces = "warn" unused_qualifications = "warn" - -[profile.release] -lto = true