From d6acc4c09c844cec1c2fab8bcb94b727f96f181f Mon Sep 17 00:00:00 2001 From: bin liu Date: Wed, 18 Nov 2020 15:50:27 +0800 Subject: [PATCH] agent: enable lto flag for Cargo to get better optimized code The lto setting controls the -C lto flag which controls LLVM's link time optimizations. LTO can produce better optimized code, using whole-program analysis, at the cost of longer linking time. https://doc.rust-lang.org/cargo/reference/profiles.html#lto Fixes: #1125 Signed-off-by: bin liu --- src/agent/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/agent/Cargo.toml b/src/agent/Cargo.toml index c280211a4..6724e8cbf 100644 --- a/src/agent/Cargo.toml +++ b/src/agent/Cargo.toml @@ -46,3 +46,6 @@ members = [ "protocols", "rustjail", ] + +[profile.release] +lto = true