Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to remove specific compiler/linker flags
From: Benjamin Prestele (benjamin.prestele_at_[hidden])
Date: 2010-05-06 02:28:57


Hi Boris,

thanks for the hint. This basically works, there is only a slight catch: while the <optimization>off gets propagated down to all dependent targets, the <cxxflags> do not. So basically all dependent targets need to to be updated with the additional <cxxflags>.

So I guess there really is no simple way to actually remove flags? Something like <linkflags>-"flagToBeRemoved"?

Thanks again,
Benjamin

>> [...]In my case the "-Wl,-dead_strip -no_dead_strip_inits_and_terms" flags
>> defined for <optimization> in darwin.jam remove necessary assembly code
>> in some apps. So building <variant>release will create an incomplete
>> binary, causing the app to crash. Switching <optimization>off will
>> compile with -O0, which is also not desirable.
>
> A shot into the dark: If you use <optimization>off did you try to explicitly set the -O command line option with <cxxflags>?
>
> Boris


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