[PATCH] D37376: [libcxx] Fix libc++experimental build on Windows

Hamza Sood via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 1 02:59:42 PDT 2017

hamzasood created this revision.
Herald added a subscriber: mgorny.

This patch fixes a few problems with building libc++experimental on Windows.

Previously _LIBCPP_BUILDING_LIBRARY was defined for every source file, including files destined for the experimental library. As a result of this, non-experimental APIs were marked as dllexport when compiling the experimental library (which led to link errors whenever experimental code uses symbols from the regular libc++ library).
I've changed it so that _LIBCPP_BUILDING_LIBRARY is only defined for non-experimental source files, and _LIBCPPX_BUILDING_LIBRARY is defined for experimental source files (that macro isn't currently used for anything, it's mainly there for consistency).

I've also added the needed MSVCRT defines to the experimental code too, so that there won't be a bunch of warnings about using "deprecated" functions etc.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37376.113524.patch
Type: text/x-patch
Size: 4686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170901/9aa31d6e/attachment-0001.bin>

More information about the cfe-commits mailing list