[libcxx] Instructions for building Windows or Cygwin binaries?

I am attempting to build libcxx through Cygwin. My goal is to make sure that I don't make the Windows build any worse. Since I don't plan on using the results for anything other than running the tests, I'm open to whichever variant of Windows / Cygwin building is most convenient.

Alternatively, if all the Windows builds of libcxx are known to be completely busted and unsupported at this time, then I'll stop worrying about it, and I'll just make my best guess as to the changes that I need to make.

I've seen this page...
http://libcxx.llvm.org/results.Windows.html
... but it appears rather dated. It mentions Clang (pre-3.1) for instance.

I have attempted to get things running on my own, both through cmake, and with the buildit script.
* Fully native Windows, with CMake and Visual Studio.
** Even with -DLLVM_BUILD_RUNTIME=ON, I couldn't get a Visual studio project out of cmake.
* Cygwin, using the built-in version of clang (3.5.2) and buildit
** This headers with this version of gcc don't seem to support a lot of the c99 math functions (I think this is newlib?)
* Cygwin, using the built-in version of gcc (4.9.3) and cmake
** Same set of missing c99 math functions
* Cygwin, using i686-w64-mingw32-clang (3.5.1) and buildit
** With some source level hacks, I can get this to compile. I get loads of linker errors, mostly involving exception handling (_Unwind_Resume and the personality function).
** I couldn't get libunwind to build, because of missing elf header parsing functions.
** I couldn't get a simple hello world program to run (though I could get it to link).

So, any build bot recipes or other information out there on Windows and/or Cygwin builds?

I am attempting to build libcxx through Cygwin. My goal is to make sure
that I don't make the Windows build any worse. Since I don't plan on
using the results for anything other than running the tests, I'm open to
whichever variant of Windows / Cygwin building is most convenient.

Alternatively, if all the Windows builds of libcxx are known to be
completely busted and unsupported at this time, then I'll stop worrying
about it, and I'll just make my best guess as to the changes that I need
to make.

I've seen this page...
http://libcxx.llvm.org/results.Windows.html
... but it appears rather dated. It mentions Clang (pre-3.1) for instance.

I have attempted to get things running on my own, both through cmake,
and with the buildit script.
* Fully native Windows, with CMake and Visual Studio.
** Even with -DLLVM_BUILD_RUNTIME=ON, I couldn't get a Visual studio
project out of cmake.
* Cygwin, using the built-in version of clang (3.5.2) and buildit
** This headers with this version of gcc don't seem to support a lot of
the c99 math functions (I think this is newlib?)
* Cygwin, using the built-in version of gcc (4.9.3) and cmake
** Same set of missing c99 math functions
* Cygwin, using i686-w64-mingw32-clang (3.5.1) and buildit
** With some source level hacks, I can get this to compile. I get loads
of linker errors, mostly involving exception handling (_Unwind_Resume
and the personality function).
** I couldn't get libunwind to build, because of missing elf header
parsing functions.
** I couldn't get a simple hello world program to run (though I could
get it to link).

So, any build bot recipes or other information out there on Windows
and/or Cygwin builds?

I think K-ballo has some state on this.

Jon

Some time ago I tried making libc++ work with MSVC2013 (https://github.com/K-ballo/libcxx). I had some success, but the number of workarounds for compiler bugs was too high (most of those have been fixed in MSVC2015).

I did not try MinGW nor Cygwin, but my impression was that if they were supported at some point in time they weren't anymore.

Regards,

Well, I'll try not to make things worse on the Windows front, but I won't go out of my way to get things running either.

Native Windows compilation using MSVC is very broken and will *hopefully*
never be fixed. Ideally when we *need* Windows support it will only have to
be for the Clang frontend.

IMO Cygwin is your only hope and I've never tried to build in Cygwin. I
would be interested in seeing your patch set if you do try and make Cygwin
work. Let me know if I can be of any help.

/Eric