[LLVMdev] [PATCH]: MSVC build enhancements

Cédric Venet cedric.venet at laposte.net
Sat Mar 6 10:40:11 PST 2010


Le 06/03/2010 17:32, José Fonseca a écrit :
>
> > Are you volontary trying to break everyone build (just to build
> > your own project), or have you no idea of the effect of this
> > change:
> >
> > +add_llvm_definitions( -D_SECURE_SCL=0 )
> >
> > While I personnaly use this flag in all my projects, it should not
> > be silently and sneakily imposed to all llvm user. You should make
> > it an option, and keep the default as it is currently. I.e. make
> > this an opt-in choice.
> >
> > While I may seem harsh, this flag change the ABI !!! and its
> > effects are very hard to understand and debug. For me it is
> > criminal to try to pass this as a "trivial" patch. (already been
> > bitten here)
>
>
>  That flag was suggested in some website to solve issues when
>  statically linking release LLVM libraries in a debug build. I had no
>  idea of the full implications, nor can I really deduct from your
>  reply how deep they are, but I'll investigate it further.
>

This flag change the ABI of the M$ STL (by removing debug member 
variable). So all the C++ lib linked (statically or not) must have the 
same setting for this flag or must not exchange STL structure (and for 
static linking, there is probably ODR problems lurking).
The default is _SECURE_SCL=1 on current version of VS (they changed for 
VS2010 it seems).

So adding an option for adding this flag would be great but not changing 
the default. (The flag is interesting because it can leads to great 
performance improvement in STL heavy code (up to x10 and more on 
particular code)).

regards,

Cédric


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100306/85219dcc/attachment.html>


More information about the llvm-dev mailing list