Boost logo

Boost-Build :

Subject: Re: [Boost-build] how to remove properties
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2015-10-10 12:29:06


On 10/07/2015 07:05 AM, Fabien Chêne wrote:
> To achieve that, I have created a feature to handle the sanitizer:
> feature sanitize : off address thread : composite propagated link-incompatible ;
> feature.compose <sanitize>thread : <cxxflags>-fsanitize=thread
> <linkflags>-fsanitize=thread ;
> feature.compose <sanitize>address : <cxxflags>-fsanitize=address
> <linkflags>-fsanitize=address ;
> Then I am able to specify the sanitize feature on the command line, ie
> b2 sanitize=thread. The problem I am facing is that I have got an exe
> that links to a static third party library which is not compiled with
> -fPIC. Therefore, it cannot work because the -fsanitize=thread option
> requires that the exe be a PIE (compiled with -pie). Hence, I would
> like to be able to remove the <sanitize>thread property from the exe's
> properties. I have tried with -<sanitize>thread, no success.

  The -<xxx>yyy syntax only works for removing
requirements inherited from the project. It
doesn't do anything about properties from
the command line. Anyway, why don't you just
use <sanitize>off in this case?

> I have
> also tried adding a @conditional to remove said property by using
> property.remove but I didn't manage to make it work.

conditionals can only add properties.

> I must specify
> that the exe that fails to build is isolated and do not use code built
> with -fsanitize=thread.
> Any ideas how I can manage to solve this issue ?

In Christ,
Steven Watanabe

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at