Subject: Use of LTO

From: Alan Griffiths <[email-masked]>
Date: Fri, 20 May 2016 12:31:37 +0100

Recently I encountered a problem (lp:1583536) with shipping an archive
with objects compiled with -flto in our mirtest-dev package.

My fix was:
https://code.launchpad.net/~alan-griffiths/mir/fix-1583536/+merge/295227
and just suppressed -flto for that archive.

But I've been thinking: should we use LTO for anything other than the
shared objects we ship? It takes an age for the unit tests (for example)
to link with LTO, and while the binaries are smaller is that really the
right trade off?

Moving the -flto options to the src tree rather than root might be the
best choice.

Thoughts?

---

From: [email-masked]
Date: Mon, 23 May 2016 09:43:23 +1000

> Moving the -flto options to the src tree rather than root might be the

This seems sensible to me. We link to only the shared objects in the 
acceptance tests, so they should still pick up any problems.