This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: lto and compile flag associations
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: Jack Howarth <howarth at bromo dot med dot uc dot edu>, gcc at gcc dot gnu dot org
- Date: Mon, 17 May 2010 14:39:49 +0200
- Subject: Re: lto and compile flag associations
- References: <20100517031852.GA28916@bromo.med.uc.edu> <4BF13642.7090909@google.com>
On Mon, May 17, 2010 at 2:27 PM, Diego Novillo <dnovillo@google.com> wrote:
> On 5/16/10 23:18 , Jack Howarth wrote:
>> ? ?What is the current LTO design with regards to the
>> retention of compiler flags during the actual link
>> time optimization compilation steps. For example, if
>
> Some options are embedded, but not all (see lto-opts.c). ?You will need
> to pass the same flags to the compile and link commands. ?The options
> that are saved are reapplied at link-time, but no merging is done (the
> options taken from the first file in the link command are used).
That's not really true - they are sort-of merged. But also only
literally passed options do count, so option pre-/post-processing
done by the frontends are disregarded if not replicated by the
lto frontend.
Instead of trying to record switches that way we should instead
save the final settings of relevant flag_* values somewhere and
simply complain on mismatches.
Richard.