Boost logo

Boost-Build :

From: Jurko Gospodnetiæ (jurko.gospodnetic_at_[hidden])
Date: 2008-08-22 03:56:49

   Hi David.

>> According to, cflags affects both the C and C++
>> compilers, while cxxflags affects only the C++ compiler; I use cxxflags as a
>> matter of habit, but in the case of -arch, I suppose cflags would be more
>> appropriate (although I'm not aware of any C code inside of Boost anyway).
> Interesting, this caught me by surprise since I thought that cflags was only for C, cxxflags for C++ and compileflags for both.
> It is documented that way at at least.
> A small testing revealed that appears to be correct under my environment.
> cflags affected both C and C++ and compileflags was rejected as an unknown feature.
> The environment was as follows:
> Boost.Build V2 (Milestone 12)
> Boost.Jam 03.1.16
> gcc 4.2.2
> What would be the correct description of these features?

   I believe these two pages describe two slightly different things that
seem like something that should behave the same but appear to be out of

   The first one ( describes the parameters
passed to 'using' rule calls which get handled locally by toolset
initialization. This is implemented the the tools/common.jam module in
the common.handle-options() rule which converts those values to the
OPTIONS parameter passed to specific actions (assuming those actions are
called <toolset>.compile.c & <toolset>.compile.c++).

   On the other hand, the second page ( speaks
of Boost Build features bearing the same name which get processed by
each toolset separately. E.g. tools/gcc.jam toolset converts them to the
USER_OPTIONS parameter passed to specific options (gcc.compile for
<cflags> and gcc.compile.c++ for <cxxflags>).

   Perhaps these two should be in sync, and I believe this would be
quite easy to change but I think someone else is needed to approve of
this as the change seems like something that may cause quite large
compatibility problems. If you can get is pushed - cool... :-)

   Hope this helps.

   Best regards,
     Jurko Gospodnetiæ

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