I am aware of the libcxx project providing a standard library for C++
for use with clang. Is there an equivalent project for C? I guess I
could take headers like "cstdio" and rename them to "stdio.h" but I
didn't think that would necessarily be the right approach.
The reason I ask is that I have built clang/llvm (2.8) for Win64 and am
looking for the remaining parts to complete a C/C++ development
environment. I have a half-finished NSIS install script (happy to donate
it to the project) you see and I'd like to be able to package clang/llvm
for win64 distribution.
Not sure if this isn't better suited to llvm-users, so sorry if it is.
Funny you should mention C libraries. I'm on vacation from my day job until January 4th. and have just begun to port the NetBSD standard library for use with Clang. I'm targeting Linux and embedded platforms, however, so I don't think it would be of much use under Windows.
I'm pretty sure MinGW just provides headers and uses the standard MS C runtime library, at least without MSYS. That would probably be a good place for you to start.
I did think about that actually. It might well be worth looking into
zipping those up too.
For the project I've got, we're happy using MS headers. However the
problem I'm currently having is that neither -fms-extensions or
-ms-extensions are changing the fact that _WIN32 remains undefined.
For the project I've got, we're happy using MS headers. However the
problem I'm currently having is that neither -fms-extensions or
-ms-extensions are changing the fact that _WIN32 remains undefined.
I'm not sure that VC++ actually defnes _WIN32 for you. If you look at the settings for .vcproj files, you'll see it defined at that level.
If nobody else knows, I can try to get around to running an experiment, or you could do so yourself.
VC++ defines _WIN32 by default. clang was modified to define _WIN32 if the target is Visual Studio on October 21. Release 2.8 was done in September, as such _WIN32 is not defined using the 2.8 release.