[PATCH] D32411: [libcxx] Provide #include_next alternative for MSVC

Ben Craig via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 24 06:52:42 PDT 2017


bcraig added a comment.

In https://reviews.llvm.org/D32411#735128, @halyavin wrote:

> BTW, the list of include files which are located in [PROGRAM_FILES]\Microsoft Visual Studio 14.0\VC\include directory is
>
> - stdbool.h
> - limits.h
> - stdint.h
> - setjmp.h
>
>   The rest is in [PROGRAM_FILES]\Windows Kits\10\Include\10.0.whatever.0\ucrt directory. Which directory @_LIBCPP_INCLUDE_NEXT@ is supposed to point to?


My immediate goal is getting a sort-of freestanding implementation of libc++ to work in the Windows kernel.  That means that I have _LIBCPP_INCLUDE_NEXT defined as ../../km/crt.

I'll have to stew on what I want the solution to this to be.  I don't feel bad at all switching between one compiler extension (#include_next) and another (computed includes).  I would feel a little bad cooking in more knowledge of the MSVC directory layout though.  Maybe that's just the cost to pay though.  There is some pretty deep knowledge of glibc headers in libc++, so it wouldn't be terribly unusual to have similar knowledge of the MSVC CRT.

The errno changes you are suggesting may be fine, but I wasn't planning on addressing them with this patch.


https://reviews.llvm.org/D32411





More information about the cfe-commits mailing list