From b96fda95896c403b10c2c15bf82d65cfcdacd37e Mon Sep 17 00:00:00 2001 From: xxchan Date: Sun, 17 Sep 2023 03:31:49 +0000 Subject: [PATCH] chore: avoid [build-dependencies] being compiled twice Before: `cargo build --release`: Building [========> ] ../1339 After: Building [========> ] ../1065 Background https://github.com/risingwavelabs/risingwave/issues/12315#issuecomment-1722358681 --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 5742b9efc3713..2ff4337fdc868 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -180,6 +180,9 @@ lto = 'off' debug = "full" split-debuginfo = "packed" lto = "thin" +# To avoid [build-dependencies] being compiled twice +[profile.release.build-override] +opt-level = 3 # The profile used for CI in main branch. # This profile inherits from the release profile, but turns on some checks and assertions for us to @@ -216,6 +219,9 @@ inherits = "dev" opt-level = 2 incremental = false debug = 1 +# To avoid [build-dependencies] being compiled twice +[profile.ci-sim.build-override] +opt-level = 2 # Patch third-party crates for deterministic simulation. [patch.crates-io]