Boost logo

Boost-Build :

Subject: [Boost-build] how to remove properties
From: Fabien Chêne (fabien.chene_at_[hidden])
Date: 2015-10-07 09:05:10


My goal is to build an entire project with the GCC option -fsanitize=thread,

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. I have
also tried adding a @conditional to remove said property by using
property.remove but I didn't manage to make it work. 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 ?


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