[LLVMdev] Patch to compile LLVM with MSVC 2010

Aaron Ballman
2013-04-18T11:59:14Z

On Wed, Apr 17, 2013 at 2:36 PM, Sergiy Migdalskiy
<migdalskiy at hotmail.com> wrote:
> In order to get llvm to compile on Windows with MSVC 10, I have to disable
> inline on utostr to avoid internal compiler failure, and disable _xgetbv
> call in OsSupportsAVX because it's only defined in MSVC 2012 compiler.

The _xgetbv requires Visual Studio 2010 SP1 or greater, not VS 2012.

http://software.intel.com/en-us/articles/introduction-to-intel-advanced-vector-extensions

MSDN's documentation wasn't updated until 2012 though, so it's a bit
confusing.

That being said, it should still compile in a non-SP1 VS 2010, but I
believe the original code does that because 160040219 is the
identifier for 2010 SP1

~Aaron