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 <bin@hyper.sh>
This commit is contained in:
bin liu 2020-11-18 15:50:27 +08:00
parent ac6868250a
commit d6acc4c09c

View File

@ -46,3 +46,6 @@ members = [
"protocols",
"rustjail",
]
[profile.release]
lto = true