[LLVMdev] size_t?

Eric Mader emader at gmx.us
Tue Sep 30 16:01:52 PDT 2014


Hi Reid,

I copied the x64 toolsets by hand; they got installed to C:\Program 
Files (x86)\LLVM\tools\msbuild\x64; they just didn't get moved correctly 
by install.bat.

I just verified that the LLVM-vs2013 toolset.props is correct.

If it is a bitness problem, perhaps I'm failing to define something 
correctly?

Regards,
Eric

On 9/30/14, 11:29 AM, Reid Kleckner wrote:
> This looks like some kind of bitness conflict. If you are building for 
> win64, are you sure clang is getting the -m64 argument?
>
> I recall that you copied the win32 platform toolset xml files over by 
> hand, and I don't think they will have the correct flags. If you see 
> this line in the x64 toolset.props file, replace -m32 with -m64 and 
> try again:
> <AdditionalOptions>-m32 -fmsc-version=1700 
> %(AdditionalOptions)</AdditionalOptions>
>
> In the meantime, I think Hans is trying to fix the installation of 
> those xml files and hopefully that will fix issues for other users 
> going forwards.
>
> On Tue, Sep 30, 2014 at 1:55 PM, Eric Mader <emader at gmx.us 
> <mailto:emader at gmx.us>> wrote:
>
>     I'm getting compile errors because size_t is getting redefined. My
>     "forced include file" starts with:
>
>     #if BUILDING_FOR_WINDOWS
>     #define NOMINMAX
>
>     /* deal with the fact that windef.h also defines BOOL */
>     #define BOOL WINBOOL
>
>     #include <windows.h>
>     #include <intrin.h>
>
>     #undef BOOL
>     #endif
>
>     Looking at the preprocessor expansion of a typical .cpp file, I
>     see that crtdefs.h defines size_t like this:
>
>     typedef unisgned __int64 size_t;
>
>     Later on, <LLVM>\lib\clang\3.6.0\includes\stddef.h defines it as:
>
>     typedef unsigned int size_t;
>
>     Is there some other magic I need to do to get these to work?
>
>     I'm also seeing a bunch of errors like this having to do with
>     intrinsics:
>
>     1>  In file included from C:\Program Files (x86)\Microsoft Visual
>     Studio 12.0\VC\include\algorithm:6:
>     1>  In file included from C:\Program Files (x86)\Microsoft Visual
>     Studio 12.0\VC\include\xmemory:6:
>     1>  In file included from C:\Program Files (x86)\Microsoft Visual
>     Studio 12.0\VC\include\xmemory0:909:
>     1>  In file included from C:\Program Files
>     (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\intrin.h:34:
>     1>  In file included from C:\Program Files
>     (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\x86intrin.h:29:
>     1>  In file included from C:\Program Files
>     (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\immintrin.h:28:
>     1>C:\Program Files
>     (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include\mmintrin.h(52,40):
>     error : cannot initialize a parameter of type
>     '__attribute__((__vector_size__(2 * sizeof(int)))) int' (vector of
>     2 'int' values) with an rvalue of type '__v2si' (aka 'int')
>     1>      return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
>     1> ^~~~~~~~~~~
>
>     I suspect that these might be caused by the same thing as the
>     size_t problem...
>
>     Regards,
>     Eric Mader
>
>
>
>
>     _______________________________________________
>     LLVM Developers mailing list
>     LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>     http://llvm.cs.uiuc.edu
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140930/988a29f5/attachment.html>


More information about the llvm-dev mailing list