[cfe-dev] Building libcxx on Windows

Reid Kleckner rnk at google.com
Thu Mar 19 09:15:28 PDT 2015


I think the short version is that Windows support in libc++ isn't really
there yet. The core data structures and algorithms have been ported, but
the new C++11 threading library stuff relies on pthreads.

In a more general sense, most LLVM projects, including clang and libc++,
support both the MinGW toolchain and the MSVC toolchain. The more your
toolchain (system headers, compiler builtins, etc) diverges from one of
these two major ones, the less likely it is that things will work.

If you want to compile libc++ in a way that assumes that "posix works",
then you probably want to configure it to target mingw and make changes
from there.

On Wed, Mar 18, 2015 at 7:47 PM, Andrew Parker <andrew.j.c.parker at gmail.com>
wrote:

> I was wondering if there's any definitive source of information on this.
> I'm aware of this page: http://clang.llvm.org/docs/MSVCCompatibility.html
> but that is all I've managed to find so far.  This page seems to imply that
> libcxx is buildable (or there's a WIP to make it so) with MSVC.  Is that
> the case?
>
> What other Windows builds are supported, e.g. can I build with clang and
> windows sys headers?  I presume I can build with MingW?
>
> FYI I'm currently trying to build libcxx using MSVC but with custom
> "posix-like" sys headers and runtime.  Obvious blockers to me doing this
> are things like the lack of intrinsic support for atomics,
> e.g. __sync_add_and_fetch.  I can solve these issue fairly easily but
> before I do I'd like to understand if I need to.
>
> Feel free to shunt me to an appropriate doc, page or post if this is a
> dupe.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150319/bd47b168/attachment.html>


More information about the cfe-dev mailing list