[LLVMdev] Removal of Visual Studio project files.

Cory Nelson phrosty at gmail.com
Mon Nov 24 21:05:14 PST 2008


On Mon, Nov 24, 2008 at 8:18 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
> OvermindDL1 <overminddl1 at gmail.com> writes:
>
>>> Chris proposed on IRC to remove the Visual Studio project files and turn
>>> CMake into the "standard" for building LLVM with VC++.
>>>
>>> If you have strong arguments against this, please voice them.
>>
>> 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.
>
> For C source files:
>
> cmake -DCMAKE_C_FLAGS="-DSOME_DEF=value -DSOME_OTHER_DEF=value" path/to/llvm
>
> For C++ source files:
>
> cmake -DCMAKE_CXX_FLAGS="-DSOME_DEF=value -DSOME_OTHER_DEF=value" path/to/llvm
>
> I'll add this to the docs.
>
> Please list those defines and I will add an option for enabling them all
> with a single -D cmake option.
>

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

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.

-- 
Cory Nelson
http://www.int64.org




More information about the llvm-dev mailing list