From 8e1084eec33ae3e5c0b7e5640ffc65d6dd91a427 Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Fri, 27 Aug 2021 09:48:01 -0700 Subject: [PATCH] Enable link-time optimizations (#1227) This change enables LTO for release builds, which reduces CPU and memory usage in load tests. This increases compile-time overhead, so we also update rust-toolchain to 1.55.0 beta7 (due out 2021/9/9), which substantially reduces compile- time overhead. --- Cargo.toml | 4 ++++ rust-toolchain | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 22071bacad..28f38c61a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,8 +66,12 @@ members = [ # disable them. [profile.dev] debug = false + [profile.test] debug = false +[profile.release] +lto = true + [patch.crates-io] webpki = { git = "https://github.com/linkerd/webpki", branch = "cert-dns-names-0.21" } diff --git a/rust-toolchain b/rust-toolchain index b7921ae87b..c3c8cf5621 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.54.0 +beta-2021-08-22