Boost logo

Boost :

Subject: Re: [boost] [build] Default compiler options for a toolset
From: Edward Diener (eldiener_at_[hidden])
Date: 2013-11-20 00:49:05

On 11/19/2013 10:37 AM, Steven Watanabe wrote:
> On 11/18/2013 09:06 PM, Edward Diener wrote:
>> On 11/18/2013 11:05 PM, Steven Watanabe wrote:
>>> Look at the properties. If you compile with
>>> async-exceptions=on extern-c-nothrow=on, you'll
>>> get /EHac, for instance. The default for
>>> both is "off"
>> Are "defaults" harcoded somewhere or are they in some .jam file ?
> The default value is set when the feature is
> declared (in builtin.jam).

I do not understand where the default values for a C++ compile are set
in builtin.jam but I will take your word for it that they are being set
there somehow.

>> In the original command line I showed:
>> "tuple.cpp" -Fo"some_long_path\tuple.obj" -TP /Z7 /Od /Ob0 /W4 /GR
>> /MDd /Zc:forScope /Zc:wchar_t /wd4675 /EHs -c
> -TP is used to create a precompiled header. /Z7 comes from
> debug-symbols=on, debug-store=object. /Od comes from
> optimization=off. /Ob0 comes from inlining=off, /W4
> comes from warnings=all. /GR comes from rtti=on. /MDd
> is runtime-debugging=on, runtime-link=shared.
> /Zc:forScope /Zc:wchar_t /wd4675 are added unconditionally.

I see this last being set in msvc.jam. Thanks

> (Note that setting variant=debug is equivalent to
> optimization=off, debug-symbols=on, inlining=off,
> runtime-debugging=on)

OK, I understand that this will propagate, even if the Boost Build
intracicies of how it works is beyond me.

In a clang-win.jam toolset created by someone else and posted on the
Boost Build forum, the toolset flags are inherited from msvc. This was
created for clang-cl under Windows using the VC++ RTL. However there is
no supported /EH(x) like option for this clang-cl compiler. How can I
disable the command line from propagating this option entirely ? I do
not know what clang-cl uses for the various <exception-handling>,
<asynch-exceptions>, or <extern-c-nothrow> combinations, but the
compiler works fine without the clang-cl equivalent, whatever it is, of
VC++ /EH(x) being set. Nonetheless I want to remove this when using the
clang-win.jan file since the non-support of /EH(x) in clang-cl causes
repeated warning messages for each test compiled. Is there any easy way
to do this in the clang-win.jam toolset so basically no /EH(x) compiler
option is generated ?

Boost list run by bdawes at, gregod at, cpdaniel at, john at