[LLVMdev] Removal of Visual Studio project files.

Óscar Fuentes
Tue, 25 Nov 2008 05:13:00 -0000

"Cory Nelson" <phrosty at gmail.com> writes:

> On Mon, Nov 24, 2008 at 8:18 PM, Óscar Fuentes <ofv at wanadoo.es>
wrote:
>> OvermindDL1 <overminddl1 at gmail.com> writes:
>>> As long as instructions are supplied on how to pass in user defined
>>> macros to the build system.  I have to turn off a lot of the extra
>>> safety crap that VC2k5 and higher added
>> [snip]
>>> I am sure I am not the only one that does that, so supplying such
>>> instructions for how to add in your own preprocessor definitions
would
>>> be great.
>>
[snip]
> He's talking about how VC++ deprecated (with warnings) many C/C++
> functions (like strcpy, sprintf, std::copy, etc.) that a dumb
> developer could get exploited with.  Turn them off with these:
>
> _CRT_SECURE_NO_WARNINGS // C deprecation
> _SCL_SECURE_NO_WARNINGS // C++ deprecation
>

Those and others already are defined by default:

if( MSVC )
  add_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS )
  add_definitions( -D_SCL_SECURE_NO_WARNINGS -DCRT_NONSTDC_NO_WARNINGS )
  add_definitions( -D_SCL_SECURE_NO_DEPRECATE )
  add_definitions( -wd4146 -wd4503 -wd4996 -wd4800 -wd4244 -wd4624 )
  add_definitions( -wd4355 -wd4715 )
endif( MSVC )

> In addition to those, for Release builds I recommend disabling the
> "secure" stdlib features which does bounds checking and slows
down a
> lot of good code:
>
> _SECURE_SCL=0 // slow secure stdlib.

This isn't, but adding an option for just one define does not save any
work.

--
Oscar