This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: Inter-CU DWARF size optimizations and gcc -flto
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: archer at sourceware dot org, Jason Merrill <jason at redhat dot com>
- Date: Wed, 1 Feb 2012 14:32:15 +0100
- Subject: Re: Inter-CU DWARF size optimizations and gcc -flto
- References: <20120201132307.GA32578@host2.jankratochvil.net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Feb 01, 2012 at 02:23:09PM +0100, Jan Kratochvil wrote:
> I am sorry if it is clear to everyone but I admit I played with it only
> yesterday.
>
> With
> gcc -flto -flto-partition=none
>
> gcc outputs only single CU (Compilation Unit). With default (omitting)
> -flto-partition there are multiple CUs but still a few compared to the number
> of .o files.
>
> -flto is AFAIK the future for all the compilations. It is well known -flto
> debug info is somehow broken now but that needs to be fixed anyway.
It isn't only somehow broken, it is quite fundamentally broken. And even
with LTO GCC should output CUs matching the original source, one CU per
source IMHO, which is admittedly going to be very difficult though,
especially when partitioning the compilation, because multiple partitions
might need to add stuff to a single CU. IMHO at least for us -flto is a
no-go until these problems are solved though.
Jakub