[libc++] Rework the whole availability markup implementation
authorLouis Dionne <ldionne@apple.com>
Wed, 4 Nov 2020 20:01:25 +0000 (15:01 -0500)
committerLouis Dionne <ldionne@apple.com>
Thu, 5 Nov 2020 17:28:52 +0000 (12:28 -0500)
commit2eadbc86142bab5b46dfeb55d8bd6724234278bb
tree39cc84a900ab3b5d9d28635c8bc3a5e169fb0d52
parentafe92642cc73db48ea46a1dc1a534492249040a7
[libc++] Rework the whole availability markup implementation

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).

Differential Revision: https://reviews.llvm.org/D90843
29 files changed:
libcxx/CMakeLists.txt
libcxx/cmake/caches/Apple.cmake
libcxx/docs/DesignDocs/AvailabilityMarkup.rst [deleted file]
libcxx/include/CMakeLists.txt
libcxx/include/__availability [new file with mode: 0644]
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