[cfe-dev] libcxx compilation using clang
Gaurav Mittal
gaurav.mittal at gmail.com
Fri Apr 8 07:15:59 PDT 2011
The buildit script can be found inside libcxx/lib. It doesn't use
-fms-extensions.
Gaurav
-----Original Message-----
From: Francois Pichet [mailto:pichet2000 at gmail.com]
Sent: Friday, April 08, 2011 5:22 AM
To: Gaurav Mittal
Cc: cfe-dev at cs.uiuc.edu
Subject: Re: [cfe-dev] libcxx compilation using clang
On Thu, Apr 7, 2011 at 6:33 PM, Gaurav Mittal <gaurav.mittal at gmail.com>
wrote:
> Hi,
> I'm trying to build libc++ (libcxx) on a Windows machine with clang (built
> with VC++ 10.0) using the buildit script. I'm getting the errors shown at
> the end of the email. Could someone tell me if the compilation should be
> including the MSVC version of the string.h file? Ideally I would like to
> compile the library to LLVM bitcode or LLVM IR and not the native binary.
I
> compiled clang using MSVC. Has anybody succeeded in using this combination
> to compile libcxx?
>
> I appreciate any help you can provide.
>
> Gaurav
>
> clang++: warning: argument unused during compilation: '-arch x86_64'
> In file included from ../src/algorithm.cpp:10:
> In file included from ../include/algorithm:592:
> In file included from ../include/cstring:61:
> /Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/string.h(290)
:
> error: expected expression
> return (_Src == NULL) ? 0 : wcsnlen(_Src, _MaxCount);
> ^
> In file included from ../src/algorithm.cpp:10:
> In file included from ../include/algorithm:592:
> ../include/cstring(94) : error: declaration conflicts with target of
using
> declaration already in scope
> inline _LIBCPP_INLINE_VISIBILITY char* strchr( char* __s, int
> __c) {return ::strchr(__s, __c);}
>
> ...
clang cannot parse all the MSVC header files.
But you shouldn't see this particular error (string.h, line 290)
I am not familiar with the buildit script but is -fms-extensions used?
More information about the cfe-dev
mailing list