This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Rework the whole availability markup implementation
ClosedPublic

Authored by ldionne on Nov 5 2020, 5:55 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rG2eadbc86142b: [libc++] Rework the whole availability markup implementation
Summary

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

Diff Detail

Event Timeline

ldionne created this revision.Nov 5 2020, 5:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 5 2020, 5:55 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested review of this revision.Nov 5 2020, 5:55 AM
ldionne accepted this revision as: Restricted Project.Nov 5 2020, 9:28 AM
This revision was not accepted when it landed; it landed in state Needs Review.Nov 5 2020, 9:29 AM
This revision was automatically updated to reflect the committed changes.
libcxx/CMakeLists.txt