Boost logo

Boost-Build :

Subject: Re: [Boost-build] Choice of optimization flags for GCC
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-09-09 13:33:40


On Tuesday 09 September 2008 20:33:00 Brad Howes wrote:
> On Sep 9, 2008, at 11:45 AM, David Abrahams wrote:
>
> > Yes, but then we have another problem: the gcc documentation says that
> > you should only use one -Ox option on the command-line, and we have no
> > way to avoid producing command lines containing one of the values -O0
> > -O3 or -Os.
>
>
> From http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Optimize-Options.html#Optimize-Options
>
> If you use multiple -O options, with or without level numbers,
> the last such option is the one that is effective.
>
> I assume it works since I rely on that to keep my release builds at -O2.

Exactly. The last option takes predecence, and cxxflags are added to the end of
the command line.

- Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk