From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-18 07:22:28
Alexey Pakhunov wrote:
> Reece Dunn wrote:
>>Cool! I saw optional in the list of types, but was unsure how to use it :).
> Well, the only problem - it is not checked in yet. :-)
In the list of feature attributes:
"An optional feature is a feature that is not required to appear in a
build specification. Every non-optional non-free feature has a default
value that is used when a value for the feature is not otherwise
specified, either in a target's requirements or in the user's build
request. [A feature's default value is given by the first value listed
in the feature's declaration. -- move this elsewhere - dwa]"
...so something is in there!
>>feature safe-async-exceptions :
>> off # disable "safe" structured exception handling
>> on # enable "safe" structured exception handling
>> : incidental ;
>>Note that it is called "async-exceptions" rather than SEH to be
>>consistent with the <async-exceptions> feature.
> I'm not sure that I understood it correctly. When the feature is on the
> linker will check that all .obj files are compatible with "safeseh" and
> will not link if some are not compatible. In other words it does not
> affect .obj file or image generation. It simply decides whether an image
> can be produced or not. Is it right?
This is for when you want to write an SEH filter that, for example,
allows you to throw a std::runtime_eror( "divide by zero" ) exception
instead of getting a divide by zero structured exception.
You declare a SEH as safe (using the assembler .SAFESEH) so the liker
can place your handler in the correct order. If I have this correct,
SEH's must be sequentially placed on the stack.
> --- Quote ---
> /SAFESEH is only valid when linking for x86 targets.
> So it should be:
> local i386 =
> <architecture>x86/<address-model>32 ;
> flags msvc LINKFLAGS $(i386)/<safe-async-exceptions>on : /safeseh ;
> flags msvc LINKFLAGS $(i386)/<safe-async-exceptions>off : /safeseh:no ;
Yes, you are right. It would be useful to define these at the top of
msvc.jam, or in your msplatformsdk.jam, so you'd have:
local i386 = ... ;
local ia64 = ... ;
local amd64 = ... ;
that can be used elsewhere. This would make it easier when we ditch
setenv.bat and vcvars.bat.
>>>>+ $(.ASM) -nologo -c -coff -Cp -Cx $(ASMFLAGS) -Fo "$(<:W)" "$(>:W)"
>>>Where is '.ASM' defined? Normally it is initialized in 'msvc.init' but I
>>>don't see this part of code in the patch.
>>It's in tools/types/asm.jam; it was added for the gcc.jam assembler
>>support (it is picked up by the "import type" statemnent).
> tools/types/asm.jam defines ASM - a target type. I asked about .ASM
> (with '.' in front of ASM). Take a look at msvc.init:
Oops! Sorry... I do have it defined as you say, it just got lost when I
was modifying the original to create the patch (sigh). I will add this
to an updated diff that includes the $(i386) stuff.
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