[libcxx-commits] [PATCH] D90843: [libc++] Rework the whole availability markup implementation

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 5 05:55:13 PST 2020


ldionne created this revision.
Herald added subscribers: libcxx-commits, jfb, jkorous, JDevlieghere, arichardson, mgorny.
Herald added a project: libc++.
Herald added a reviewer: libc++.
ldionne requested review of this revision.

Currently, vendor-specific availability markup is enabled by default.
This means that even when building against trunk libc++, the headers
will by default prevent you from using some features that were not
released in the dylib on your target platform. This is a source of
frustration since people building libc++ from sources are usually not
trying to use some vendor's released dylib.

For that reason, I've been thinking for a long time that availability
annotations should be off by default, which is the primary change that
this commit enables.

In addition, it reworks the implementation to make it easier for new
vendors to add availability annotations for their platform, and it
refreshes the documentation to reflect the current state of the codebase.

Finally, a CMake configuration option is added to control whether
availability annotations should be turned on for the flavor of libc++
being created. The intent is for vendors like Apple to turn it on, and
for the upstream libc++ to leave it off (the default).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90843

Files:
  libcxx/CMakeLists.txt
  libcxx/cmake/caches/Apple.cmake
  libcxx/docs/DesignDocs/AvailabilityMarkup.rst
  libcxx/include/CMakeLists.txt
  libcxx/include/__availability
  libcxx/include/__config
  libcxx/include/__config_site.in
  libcxx/include/__locale
  libcxx/include/__threading_support
  libcxx/include/any
  libcxx/include/atomic
  libcxx/include/barrier
  libcxx/include/charconv
  libcxx/include/chrono
  libcxx/include/exception
  libcxx/include/filesystem
  libcxx/include/fstream
  libcxx/include/future
  libcxx/include/latch
  libcxx/include/memory
  libcxx/include/new
  libcxx/include/optional
  libcxx/include/semaphore
  libcxx/include/shared_mutex
  libcxx/include/typeinfo
  libcxx/include/variant
  libcxx/src/optional.cpp
  libcxx/utils/libcxx/test/features.py
  libcxx/utils/libcxx/test/params.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90843.303093.patch
Type: text/x-patch
Size: 34334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201105/0dfa4e54/attachment-0001.bin>


More information about the libcxx-commits mailing list