Farid Zaripov wrote:
-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED] Sent: Monday, September 10, 2007 6:35 PM
To: stdcxx-dev@incubator.apache.org
Subject: Re: svn commit: r574015 - /incubator/stdcxx/trunk/etc/config/windows/projectdef.js

[EMAIL PROTECTED] wrote:
Author: faridz
Date: Sun Sep  9 06:57:32 2007
New Revision: 574015

URL: http://svn.apache.org/viewvc?rev=574015&view=rev
Log:
2007-09-09 Farid Zaripov <[EMAIL PROTECTED]>

        * projectdef.js (projectCreateVCProject): Enable using of the
        intrinsic functions in release builds.
Unless it's obvious, it's helpful to say why a change was made.
You might know why now and some of the rest of us who read the list might be able to guess (to enable the Interlocked functions,
right?) but others who just read the ChangeLog may not.

  No. The Interlocked functions will be intrinsic in all builds, because
of
presence of the #pragma intrinsic (Interlockedxxx) in _mutex.h

  The purpose of this patch is enable using of some CRT functions
(memcmp, memcpy, memset, ...) as intrinsic in release builds.
The full list of intrinsic CRT functions here:
http://msdn2.microsoft.com/en-us/library/tzkfha43(VS.80).aspx

  But now I can say, that this patch is useless. The projects in
release builds are compiled with /O1 optimization,

According to MSDN, /O1 optimizes for minimum size. That's not
what we typically target and it's different from the default
setting of /O2 used by the IDE for release builds which does
include /Oi.

http://msdn2.microsoft.com/en-us/library/k1ack8f1(VS.80).aspx
http://msdn2.microsoft.com/en-us/library/59a3b321(VS.80).aspx

which not includes
/Oi option. And setting of the EnableIntrinsicFunctions property to true
doesn't leads to compiling with /Oi option unless /O1 or /O2 options
are not specified. So we should append /Oi to the command line manually
(using AdditionalOptions property) to enable using of CRT functions
as intrinsic (or use /O2 optimization, because /O2 implies /Oi).

Why not use /O2?

Martin

Reply via email to