diff mbox

Cargo.toml: enable link-time optimisation

Message ID 1464903892-19810-1-git-send-email-andrew.donnellan@au1.ibm.com
State Rejected
Headers show

Commit Message

Andrew Donnellan June 2, 2016, 9:44 p.m. UTC
Enable link-time optimisation for release builds. Currently, this shrinks
the output binary by around 200 KB.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
 Cargo.toml | 3 +++
 1 file changed, 3 insertions(+)

Comments

Russell Currey June 15, 2016, 1:38 a.m. UTC | #1
On Fri, 2016-06-03 at 07:44 +1000, Andrew Donnellan wrote:
> Enable link-time optimisation for release builds. Currently, this shrinks
> the output binary by around 200 KB.
> 
> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
> ---

This is a good idea, but I am NAKing it regardless.  The advantage really
doesn't matter, and we're adding a compilation difference that may some day be
deprecated, or cause a bug, or something.  It's just not worth it overall.

In the long term I am really hoping snowpatch is something that can run forever,
and maybe someone who doesn't know much about it will have to fix it, and this
may well just ruin their week.
diff mbox

Patch

diff --git a/Cargo.toml b/Cargo.toml
index bef3c88..668d094 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,6 +25,9 @@  license = "GPL-2.0+"
 [[bin]]
 name = "snowpatch"
 
+[profile.release]
+lto = true
+
 [dependencies]
 hyper = ">0.9.2" # 0.9.2 or later required for proxy support
 git2 = "0.3"