[PATCH] D37182: [libcxx] Special visibility macros for the experimental library

Hamza Sood via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 31 07:32:00 PDT 2017


hamzasood updated this revision to Diff 113399.
hamzasood added a comment.
Herald added a subscriber: mgorny.

I've added a couple more Windows macro-related fixes to the experimental library.

Most importantly is the change to _LIBCPP_BUILDING_LIBRARY. 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.


https://reviews.llvm.org/D37182

Files:
  CMakeLists.txt
  docs/DesignDocs/VisibilityMacros.rst
  include/experimental/__config
  include/experimental/__memory
  include/experimental/algorithm
  include/experimental/any
  include/experimental/coroutine
  include/experimental/dynarray
  include/experimental/filesystem
  include/experimental/functional
  include/experimental/memory_resource
  include/experimental/numeric
  include/experimental/optional
  include/experimental/propagate_const
  include/experimental/string_view
  include/experimental/tuple
  include/experimental/type_traits
  include/experimental/utility
  lib/CMakeLists.txt
  test/libcxx/selftest/experimental_visibility.sh.cpp
  utils/check_experimental_visibility.py
  utils/libcxx/test/config.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37182.113399.patch
Type: text/x-patch
Size: 156922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170831/8a6a3580/attachment-0001.bin>


More information about the cfe-commits mailing list