summaryrefslogtreecommitdiffstats
path: root/lib/libcxx/docs
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-06-17 22:18:29 +0000
committerpatrick <patrick@openbsd.org>2019-06-17 22:18:29 +0000
commit504b10ec5101b237e4c07e1f2de4b6c48138181e (patch)
tree979c9ce8ab11efd05e4413305758dc5d6bc76ab4 /lib/libcxx/docs
parentA bit more KNF no binary change (diff)
downloadwireguard-openbsd-504b10ec5101b237e4c07e1f2de4b6c48138181e.tar.xz
wireguard-openbsd-504b10ec5101b237e4c07e1f2de4b6c48138181e.zip
Import libc++ 8.0.0.
Diffstat (limited to 'lib/libcxx/docs')
-rw-r--r--lib/libcxx/docs/BuildingLibcxx.rst32
-rw-r--r--lib/libcxx/docs/DesignDocs/AvailabilityMarkup.rst49
-rw-r--r--lib/libcxx/docs/DesignDocs/CapturingConfigInfo.rst2
-rw-r--r--lib/libcxx/docs/DesignDocs/FeatureTestMacros.rst44
-rw-r--r--lib/libcxx/docs/DesignDocs/VisibilityMacros.rst38
-rw-r--r--lib/libcxx/docs/FeatureTestMacroTable.rst200
-rw-r--r--lib/libcxx/docs/ReleaseNotes.rst48
-rw-r--r--lib/libcxx/docs/TestingLibcxx.rst11
-rw-r--r--lib/libcxx/docs/UsingLibcxx.rst81
-rw-r--r--lib/libcxx/docs/conf.py8
-rw-r--r--lib/libcxx/docs/index.rst29
11 files changed, 465 insertions, 77 deletions
diff --git a/lib/libcxx/docs/BuildingLibcxx.rst b/lib/libcxx/docs/BuildingLibcxx.rst
index daf9229a0d0..a498c0027bd 100644
--- a/lib/libcxx/docs/BuildingLibcxx.rst
+++ b/lib/libcxx/docs/BuildingLibcxx.rst
@@ -222,6 +222,15 @@ libc++ specific options
Define libc++ destination prefix.
+.. option:: LIBCXX_HERMETIC_STATIC_LIBRARY:BOOL
+
+ **Default**: ``OFF``
+
+ Do not export any symbols from the static libc++ library. This is useful when
+ This is useful when the static libc++ library is being linked into shared
+ libraries that may be used in with other shared libraries that use different
+ C++ library. We want to avoid avoid exporting any libc++ symbols in that case.
+
.. _libc++experimental options:
libc++experimental Specific Options
@@ -316,6 +325,15 @@ libc++ Feature Options
Build the libc++ benchmark tests and the Google Benchmark library needed
to support them.
+.. option:: LIBCXX_BENCHMARK_TEST_ARGS:STRING
+
+ **Default**: ``--benchmark_min_time=0.01``
+
+ A semicolon list of arguments to pass when running the libc++ benchmarks using the
+ ``check-cxx-benchmarks`` rule. By default we run the benchmarks for a very short amount of time,
+ since the primary use of ``check-cxx-benchmarks`` is to get test and sanitizer coverage, not to
+ get accurate measurements.
+
.. option:: LIBCXX_BENCHMARK_NATIVE_STDLIB:STRING
**Default**:: ``""``
@@ -360,6 +378,20 @@ The following options allow building libc++ for a different ABI version.
Build the "unstable" ABI version of libc++. Includes all ABI changing features
on top of the current stable version.
+.. option:: LIBCXX_ABI_NAMESPACE:STRING
+
+ **Default**: ``__n`` where ``n`` is the current ABI version.
+
+ This option defines the name of the inline ABI versioning namespace. It can be used for building
+ custom versions of libc++ with unique symbol names in order to prevent conflicts or ODR issues
+ with other libc++ versions.
+
+ .. warning::
+ When providing a custom namespace, it's the users responsibility to ensure the name won't cause
+ conflicts with other names defined by libc++, both now and in the future. In particular, inline
+ namespaces of the form ``__[0-9]+`` are strictly reserved by libc++ and may not be used by users.
+ Doing otherwise could cause conflicts and hinder libc++ ABI evolution.
+
.. option:: LIBCXX_ABI_DEFINES:STRING
**Default**: ``""``
diff --git a/lib/libcxx/docs/DesignDocs/AvailabilityMarkup.rst b/lib/libcxx/docs/DesignDocs/AvailabilityMarkup.rst
index b8b44509790..4e6d80b50bf 100644
--- a/lib/libcxx/docs/DesignDocs/AvailabilityMarkup.rst
+++ b/lib/libcxx/docs/DesignDocs/AvailabilityMarkup.rst
@@ -24,11 +24,11 @@ systems. For example::
// Define availability macros.
#if defined(_LIBCPP_USE_AVAILABILITY_APPLE)
- #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable))
+ # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable))
#else if defined(_LIBCPP_USE_AVAILABILITY_SOME_OTHER_VENDOR)
- #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable))
- #else
- #define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+ # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS __attribute__((unavailable))
+ #else
+ # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
#endif
When the library is updated by the platform vendor, the markup can be updated.
@@ -43,9 +43,9 @@ For example::
In the source code, the macro can be added on a class if the full class requires
type info from the library for example::
- _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
- class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
- : public std::logic_error {
+ _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
+ class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
+ : public std::logic_error {
or on a particular symbol:
@@ -55,7 +55,7 @@ or on a particular symbol:
Testing
=======
-Some parameters can be passed to lit to run the test-suite and exercising the
+Some parameters can be passed to lit to run the test-suite and exercise the
availability.
* The `platform` parameter controls the deployment target. For example lit can
@@ -65,14 +65,11 @@ availability.
the test-suite against the host system library. Alternatively a path to the
directory containing a specific prebuilt libc++ can be used, for example:
`--param=use_system_cxx_lib=/path/to/macOS/10.8/`.
-* The `with_availability` boolean parameter enables the availability markup.
Tests can be marked as XFAIL based on multiple features made available by lit:
-* if either `use_system_cxx_lib` or `with_availability` is passed to lit,
- assuming `--param=platform=macosx10.8` is passed as well the following
- features will be available:
+* if `--param=platform=macosx10.8` is passed, the following features will be available:
- availability
- availability=x86_64
@@ -81,11 +78,11 @@ Tests can be marked as XFAIL based on multiple features made available by lit:
- availability=x86_64-apple-macosx10.8
- availability=macosx10.8
- This feature is used to XFAIL a test that *is* using a class of a method marked
+ This feature is used to XFAIL a test that *is* using a class or a method marked
as unavailable *and* that is expected to *fail* if deployed on an older system.
-* if `use_system_cxx_lib` is passed to lit, the following features will also
- be available:
+* if `use_system_cxx_lib` and `--param=platform=macosx10.8` are passed to lit,
+ the following features will also be available:
- with_system_cxx_lib
- with_system_cxx_lib=x86_64
@@ -94,21 +91,9 @@ Tests can be marked as XFAIL based on multiple features made available by lit:
- with_system_cxx_lib=x86_64-apple-macosx10.8
- with_system_cxx_lib=macosx10.8
- This feature is used to XFAIL a test that is *not* using a class of a method
+ This feature is used to XFAIL a test that is *not* using a class or a method
marked as unavailable *but* that is expected to fail if deployed on an older
- system. For example if we know that it exhibits a but in the libc on a
- particular system version.
-
-* if `with_availability` is passed to lit, the following features will also
- be available:
-
- - availability_markup
- - availability_markup=x86_64
- - availability_markup=macosx
- - availability_markup=x86_64-macosx
- - availability_markup=x86_64-apple-macosx10.8
- - availability_markup=macosx10.8
-
- This feature is used to XFAIL a test that *is* using a class of a method
- marked as unavailable *but* that is expected to *pass* if deployed on an older
- system. For example if it is using a symbol in a statically evaluated context.
+ system. For example, if the test exhibits a bug in the libc on a particular
+ system version, or if the test uses a symbol that is not available on an
+ older version of the dylib (but for which there is no availability markup,
+ otherwise the XFAIL should use `availability` above).
diff --git a/lib/libcxx/docs/DesignDocs/CapturingConfigInfo.rst b/lib/libcxx/docs/DesignDocs/CapturingConfigInfo.rst
index 88102251d93..29156bff8bc 100644
--- a/lib/libcxx/docs/DesignDocs/CapturingConfigInfo.rst
+++ b/lib/libcxx/docs/DesignDocs/CapturingConfigInfo.rst
@@ -28,7 +28,7 @@ Design Goals
It makes developers lives harder if they have to regenerate the libc++ headers
every time they are modified.
-* The solution should not make any of the libc++ headers dependant on
+* The solution should not make any of the libc++ headers dependent on
files generated by the build system. The headers should be able to compile
out of the box without any modification.
diff --git a/lib/libcxx/docs/DesignDocs/FeatureTestMacros.rst b/lib/libcxx/docs/DesignDocs/FeatureTestMacros.rst
new file mode 100644
index 00000000000..d55af96c674
--- /dev/null
+++ b/lib/libcxx/docs/DesignDocs/FeatureTestMacros.rst
@@ -0,0 +1,44 @@
+===================
+Feature Test Macros
+===================
+
+.. contents::
+ :local:
+
+Overview
+========
+
+Libc++ implements the C++ feature test macros as specified in the C++2a standard,
+and before that in non-normative guiding documents (`See cppreference <https://en.cppreference.com/w/User:D41D8CD98F/feature_testing_macros>`)
+
+Design
+======
+
+Feature test macros are tricky to track, implement, test, and document correctly.
+They must be available from a list of headers, they may have different values in
+different dialects, and they may or may not be implemented by libc++. In order to
+track all of these conditions correctly and easily, we want a Single Source of
+Truth (SSoT) that defines each feature test macro, its values, the headers it
+lives in, and whether or not is is implemented by libc++. From this SSoA we
+have enough information to automatically generate the `<version>` header,
+the tests, and the documentation.
+
+Therefore we maintain a SSoA in
+`libcxx/test/std/language.support/support.limits/support.limits.general/generate_feature_test_macro_components.py`
+which doubles as a script to generate the following components:
+
+* The `<version>` header.
+* The version tests under `support.limits.general`.
+* Documentation of libc++'s implementation of each macro.
+
+Usage
+=====
+
+The `generate_feature_test_macro_components.py` script is used to track and
+update feature test macros in libc++.
+
+Whenever a feature test macro is added or changed, the table should be updated
+and the script should be re-ran. The script will clobber the existing test files
+and the documentation and it will generate a new `<version>` header as a
+temporary file. The generated `<version>` header should be merged with the
+existing one. \ No newline at end of file
diff --git a/lib/libcxx/docs/DesignDocs/VisibilityMacros.rst b/lib/libcxx/docs/DesignDocs/VisibilityMacros.rst
index ab577df1364..d0d4f0adb22 100644
--- a/lib/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/lib/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -22,11 +22,11 @@ Visibility Macros
Mark a symbol as being exported by the libc++ library. This attribute must
be applied to the declaration of all functions exported by the libc++ dylib.
-**_LIBCPP_EXTERN_VIS**
+**_LIBCPP_EXPORTED_FROM_ABI**
Mark a symbol as being exported by the libc++ library. This attribute may
- only be applied to objects defined in the libc++ library. On Windows this
- macro applies `dllimport`/`dllexport` to the symbol. On all other platforms
- this macro has no effect.
+ only be applied to objects defined in the libc++ runtime library. On Windows,
+ this macro applies `dllimport`/`dllexport` to the symbol, and on other
+ platforms it gives the symbol default visibility.
**_LIBCPP_OVERRIDABLE_FUNC_VIS**
Mark a symbol as being exported by the libc++ library, but allow it to be
@@ -44,6 +44,21 @@ Visibility Macros
Mark a function as not being part of the ABI of any final linked image that
uses it.
+**_LIBCPP_HIDE_FROM_ABI_AFTER_V1**
+ Mark a function as being hidden from the ABI (per `_LIBCPP_HIDE_FROM_ABI`)
+ when libc++ is built with an ABI version after ABI v1. This macro is used to
+ maintain ABI compatibility for symbols that have been historically exported
+ by libc++ in v1 of the ABI, but that we don't want to export in the future.
+
+ This macro works as follows. When we build libc++, we either hide the symbol
+ from the ABI (if the symbol is not part of the ABI in the version we're
+ building), or we leave it included. From user code (i.e. when we're not
+ building libc++), the macro always marks symbols as internal so that programs
+ built using new libc++ headers stop relying on symbols that are removed from
+ the ABI in a future version. Each time we release a new stable version of the
+ ABI, we should create a new _LIBCPP_HIDE_FROM_ABI_AFTER_XXX macro, and we can
+ use it to start removing symbols from the ABI after that stable version.
+
**_LIBCPP_HIDE_FROM_ABI_PER_TU**
This macro controls whether symbols hidden from the ABI with `_LIBCPP_HIDE_FROM_ABI`
are local to each translation unit in addition to being local to each final
@@ -67,9 +82,9 @@ Visibility Macros
**_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT**
This macro controls the default value for `_LIBCPP_HIDE_FROM_ABI_PER_TU`.
When the macro is defined, per TU ABI insulation is enabled by default, and
- `_LIBCPP_HIDE_FROM_ABI_PER_TU` is defined to 1 unless overriden by users.
+ `_LIBCPP_HIDE_FROM_ABI_PER_TU` is defined to 1 unless overridden by users.
Otherwise, per TU ABI insulation is disabled by default, and
- `_LIBCPP_HIDE_FROM_ABI_PER_TU` is defined to 0 unless overriden by users.
+ `_LIBCPP_HIDE_FROM_ABI_PER_TU` is defined to 0 unless overridden by users.
This macro is intended for vendors to control whether they want to ship
libc++ with per TU ABI insulation enabled by default. Users can always
@@ -77,7 +92,7 @@ Visibility Macros
appropriately.
By default, this macro is not defined, which means that per TU ABI insulation
- is not provided unless explicitly overriden by users.
+ is not provided unless explicitly overridden by users.
**_LIBCPP_TYPE_VIS**
Mark a type's typeinfo, vtable and members as having default visibility.
@@ -172,15 +187,6 @@ Visibility Macros
against the libc++ headers after making `_LIBCPP_TYPE_VIS` and
`_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` expand to default visibility.
-**_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY**
- Mark a member function of a class template as visible and always inline. This
- macro should only be applied to member functions of class templates that are
- externally instantiated. It is important that these symbols are not marked
- as hidden as that will prevent the dylib definition from being found.
-
- This macro is used to maintain ABI compatibility for symbols that have been
- historically exported by the libc++ library but are now marked inline.
-
**_LIBCPP_EXCEPTION_ABI**
Mark the member functions, typeinfo, and vtable of the type as being exported
by the libc++ library. This macro must be applied to all *exception types*.
diff --git a/lib/libcxx/docs/FeatureTestMacroTable.rst b/lib/libcxx/docs/FeatureTestMacroTable.rst
new file mode 100644
index 00000000000..d900497eba7
--- /dev/null
+++ b/lib/libcxx/docs/FeatureTestMacroTable.rst
@@ -0,0 +1,200 @@
+.. _FeatureTestMacroTable:
+
+==========================
+Feature Test Macro Support
+==========================
+
+.. contents::
+ :local:
+
+Overview
+========
+
+This file documents the feature test macros currently supported by libc++.
+
+.. _feature-status:
+
+Status
+======
+
+.. table:: Current Status
+ :name: feature-status-table
+ :widths: auto
+
+ ================================================= =================
+ Macro Name Value
+ ================================================= =================
+ **C++ 14**
+ -------------------------------------------------------------------
+ ``__cpp_lib_chrono_udls`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_complex_udls`` ``201309L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_exchange_function`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_generic_associative_lookup`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_integer_sequence`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_integral_constant_callable`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_is_final`` ``201402L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_is_null_pointer`` ``201309L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_make_reverse_iterator`` ``201402L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_make_unique`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_null_iterators`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_quoted_string_io`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_result_of_sfinae`` ``201210L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_robust_nonmodifying_seq_ops`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_shared_timed_mutex`` ``201402L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_string_udls`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_transformation_trait_aliases`` ``201304L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_transparent_operators`` ``201210L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_tuple_element_t`` ``201402L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_tuples_by_type`` ``201304L``
+ ------------------------------------------------- -----------------
+ **C++ 17**
+ -------------------------------------------------------------------
+ ``__cpp_lib_addressof_constexpr`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_allocator_traits_is_always_equal`` ``201411L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_any`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_apply`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_array_constexpr`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_as_const`` ``201510L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_atomic_is_always_lock_free`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_bool_constant`` ``201505L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_boyer_moore_searcher`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_byte`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_chrono`` ``201611L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_clamp`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_enable_shared_from_this`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_execution`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_filesystem`` ``201703L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_gcd_lcm`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_hardware_interference_size`` ``201703L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_has_unique_object_representations`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_hypot`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_incomplete_container_elements`` ``201505L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_invoke`` ``201411L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_is_aggregate`` ``201703L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_is_invocable`` ``201703L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_is_swappable`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_launder`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_logical_traits`` ``201510L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_make_from_tuple`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_map_try_emplace`` ``201411L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_math_special_functions`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_memory_resource`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_node_extract`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_nonmember_container_access`` ``201411L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_not_fn`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_optional`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_parallel_algorithm`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_raw_memory_algorithms`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_sample`` ``201603L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_scoped_lock`` ``201703L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_shared_mutex`` ``201505L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_shared_ptr_arrays`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_shared_ptr_weak_type`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_string_view`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_to_chars`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_transparent_operators`` ``201510L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_type_trait_variable_templates`` ``201510L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_uncaught_exceptions`` ``201411L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_unordered_map_try_emplace`` ``201411L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_variant`` ``201606L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_void_t`` ``201411L``
+ ------------------------------------------------- -----------------
+ **C++ 2a**
+ -------------------------------------------------------------------
+ ``__cpp_lib_atomic_ref`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_bind_front`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_bit_cast`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_char8_t`` ``201811L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_concepts`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_constexpr_misc`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_constexpr_swap_algorithms`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_destroying_delete`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_erase_if`` ``201811L``
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_generic_unordered_lookup`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_is_constant_evaluated`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_list_remove_return_type`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_ranges`` *unimplemented*
+ ------------------------------------------------- -----------------
+ ``__cpp_lib_three_way_comparison`` *unimplemented*
+ ================================================= =================
+
+
diff --git a/lib/libcxx/docs/ReleaseNotes.rst b/lib/libcxx/docs/ReleaseNotes.rst
new file mode 100644
index 00000000000..ca5a534ae84
--- /dev/null
+++ b/lib/libcxx/docs/ReleaseNotes.rst
@@ -0,0 +1,48 @@
+==========================
+Libc++ 8.0.0 Release Notes
+==========================
+
+.. contents::
+ :local:
+ :depth: 2
+
+Written by the `Libc++ Team <https://libcxx.llvm.org>`_
+
+Introduction
+============
+
+This document contains the release notes for the libc++ C++ Standard Library,
+part of the LLVM Compiler Infrastructure, release 8.0.0. Here we describe the
+status of libc++ in some detail, including major improvements from the previous
+release and new feature work. For the general LLVM release notes, see `the LLVM
+documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may
+be downloaded from the `LLVM releases web site <https://releases.llvm.org/>`_.
+
+For more information about libc++, please see the `Libc++ Web Site
+<https://libcxx.llvm.org>`_ or the `LLVM Web Site <https://llvm.org>`_.
+
+What's New in Libc++ 8.0.0?
+===========================
+
+API Changes
+-----------
+- Building libc++ for Mac OSX 10.6 is not supported anymore.
+- Starting with LLVM 8.0.0, users that wish to link together translation units
+ built with different versions of libc++'s headers into the same final linked
+ image MUST define the _LIBCPP_HIDE_FROM_ABI_PER_TU macro to 1 when building
+ those translation units. Not defining _LIBCPP_HIDE_FROM_ABI_PER_TU to 1 and
+ linking translation units built with different versions of libc++'s headers
+ together may lead to ODR violations and ABI issues. On the flipside, code
+ size improvements should be expected for everyone not defining the macro.
+- Starting with LLVM 8.0.0, std::dynarray has been removed from the library.
+ std::dynarray was a feature proposed for C++14 that was pulled from the
+ Standard at the last minute and was never standardized. Since there are no
+ plans to standardize this facility it is being removed.
+- Starting with LLVM 8.0.0, std::bad_array_length has been removed from the
+ library. std::bad_array_length was a feature proposed for C++14 alongside
+ std::dynarray, but it never actually made it into the C++ Standard. There
+ are no plans to standardize this feature at this time. Formally speaking,
+ this removal constitutes an ABI break because the symbols were shipped in
+ the shared library. However, on macOS systems, the feature was not usable
+ because it was hidden behind availability annotations. We do not expect
+ any actual breakage to happen from this change.
diff --git a/lib/libcxx/docs/TestingLibcxx.rst b/lib/libcxx/docs/TestingLibcxx.rst
index 43c0684dc7d..ebbbf628ac0 100644
--- a/lib/libcxx/docs/TestingLibcxx.rst
+++ b/lib/libcxx/docs/TestingLibcxx.rst
@@ -138,8 +138,7 @@ configuration. Passing the option on the command line will override the default.
Specify the directory of the libc++ library to use at runtime. This directory
is not added to the linkers search path. This can be used to compile tests
against one version of libc++ and run them using another. The default value
- for this option is `cxx_library_root`. This option cannot be used
- when use_system_cxx_lib is provided.
+ for this option is `cxx_library_root`.
.. option:: use_system_cxx_lib=<bool>
@@ -155,14 +154,6 @@ configuration. Passing the option on the command line will override the default.
the default value. Otherwise the default value is True on Windows and False
on every other platform.
-.. option:: no_default_flags=<bool>
-
- **Default**: False
-
- Disable all default compile and link flags from being added. When this
- option is used only flags specified using the compile_flags and link_flags
- will be used.
-
.. option:: compile_flags="<list-of-args>"
Specify additional compile flags as a space delimited string.
diff --git a/lib/libcxx/docs/UsingLibcxx.rst b/lib/libcxx/docs/UsingLibcxx.rst
index e10a27c598a..899656cca1d 100644
--- a/lib/libcxx/docs/UsingLibcxx.rst
+++ b/lib/libcxx/docs/UsingLibcxx.rst
@@ -203,8 +203,10 @@ thread safety annotations.
This macro disables the additional diagnostics generated by libc++ using the
`diagnose_if` attribute. These additional diagnostics include checks for:
- * Giving `set`, `map`, `multiset`, `multimap` a comparator which is not
- const callable.
+ * Giving `set`, `map`, `multiset`, `multimap` and their `unordered_`
+ counterparts a comparator which is not const callable.
+ * Giving an unordered associative container a hasher that is not const
+ callable.
**_LIBCPP_NO_VCRUNTIME**:
Microsoft's C and C++ headers are fairly entangled, and some of their C++
@@ -226,6 +228,26 @@ thread safety annotations.
replacement scenarios from working, e.g. replacing `operator new` and
expecting a non-replaced `operator new[]` to call the replaced `operator new`.
+**_LIBCPP_ENABLE_NODISCARD**:
+ Allow the library to add ``[[nodiscard]]`` attributes to entities not specified
+ as ``[[nodiscard]]`` by the current language dialect. This includes
+ backporting applications of ``[[nodiscard]]`` from newer dialects and
+ additional extended applications at the discretion of the library. All
+ additional applications of ``[[nodiscard]]`` are disabled by default.
+ See :ref:`Extended Applications of [[nodiscard]] <nodiscard extension>` for
+ more information.
+
+**_LIBCPP_DISABLE_NODISCARD_EXT**:
+ This macro prevents the library from applying ``[[nodiscard]]`` to entities
+ purely as an extension. See :ref:`Extended Applications of [[nodiscard]] <nodiscard extension>`
+ for more information.
+
+**_LIBCPP_ENABLE_DEPRECATION_WARNINGS**:
+ This macro enables warnings when using deprecated components. For example,
+ when compiling in C++11 mode, using `std::auto_ptr` with the macro defined
+ will trigger a warning saying that `std::auto_ptr` is deprecated. By default,
+ this macro is not defined.
+
C++17 Specific Configuration Macros
-----------------------------------
**_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES**:
@@ -238,3 +260,58 @@ C++17 Specific Configuration Macros
**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR**:
This macro is used to re-enable `std::auto_ptr` in C++17.
+
+C++2a Specific Configuration Macros:
+------------------------------------
+**_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17**:
+ This macro can be used to disable diagnostics emitted from functions marked
+ ``[[nodiscard]]`` in dialects after C++17. See :ref:`Extended Applications of [[nodiscard]] <nodiscard extension>`
+ for more information.
+
+
+Libc++ Extensions
+=================
+
+This section documents various extensions provided by libc++, how they're
+provided, and any information regarding how to use them.
+
+.. _nodiscard extension:
+
+Extended applications of ``[[nodiscard]]``
+------------------------------------------
+
+The ``[[nodiscard]]`` attribute is intended to help users find bugs where
+function return values are ignored when they shouldn't be. After C++17 the
+C++ standard has started to declared such library functions as ``[[nodiscard]]``.
+However, this application is limited and applies only to dialects after C++17.
+Users who want help diagnosing misuses of STL functions may desire a more
+liberal application of ``[[nodiscard]]``.
+
+For this reason libc++ provides an extension that does just that! The
+extension must be enabled by defining ``_LIBCPP_ENABLE_NODISCARD``. The extended
+applications of ``[[nodiscard]]`` takes two forms:
+
+1. Backporting ``[[nodiscard]]`` to entities declared as such by the
+ standard in newer dialects, but not in the present one.
+
+2. Extended applications of ``[[nodiscard]]``, at the libraries discretion,
+ applied to entities never declared as such by the standard.
+
+Users may also opt-out of additional applications ``[[nodiscard]]`` using
+additional macros.
+
+Applications of the first form, which backport ``[[nodiscard]]`` from a newer
+dialect may be disabled using macros specific to the dialect it was added. For
+example ``_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17``.
+
+Applications of the second form, which are pure extensions, may be disabled
+by defining ``_LIBCPP_DISABLE_NODISCARD_EXT``.
+
+
+Entities declared with ``_LIBCPP_NODISCARD_EXT``
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This section lists all extended applications of ``[[nodiscard]]`` to entities
+which no dialect declares as such (See the second form described above).
+
+* ``get_temporary_buffer``
diff --git a/lib/libcxx/docs/conf.py b/lib/libcxx/docs/conf.py
index 4c1ea3653cd..50b372cf84e 100644
--- a/lib/libcxx/docs/conf.py
+++ b/lib/libcxx/docs/conf.py
@@ -40,16 +40,16 @@ master_doc = 'index'
# General information about the project.
project = u'libc++'
-copyright = u'2011-2017, LLVM Project'
+copyright = u'2011-2018, LLVM Project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '7.0'
+version = '8.0'
# The full version, including alpha/beta/rc tags.
-release = '7.0'
+release = '8.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -241,7 +241,7 @@ texinfo_documents = [
#texinfo_show_urls = 'footnote'
-# FIXME: Define intersphinx configration.
+# FIXME: Define intersphinx configuration.
intersphinx_mapping = {}
diff --git a/lib/libcxx/docs/index.rst b/lib/libcxx/docs/index.rst
index e4b3a879da9..fddf74b66a9 100644
--- a/lib/libcxx/docs/index.rst
+++ b/lib/libcxx/docs/index.rst
@@ -34,11 +34,17 @@ Getting Started with libc++
.. toctree::
:maxdepth: 2
+ ReleaseNotes
UsingLibcxx
BuildingLibcxx
TestingLibcxx
+.. toctree::
+ :hidden:
+
+ FeatureTestMacroTable
+
Current Status
--------------
@@ -79,8 +85,8 @@ reasons, but some of the major ones are:
Platform and Compiler Support
-----------------------------
-libc++ is known to work on the following platforms, using gcc-4.2 and
-clang (lack of C++11 language support disables some functionality).
+libc++ is known to work on the following platforms, using gcc and
+clang.
Note that functionality provided by ``<atomic>`` is only functional with clang
and GCC.
@@ -104,8 +110,9 @@ C++ Dialect Support
* C++11 - Complete
* `C++14 - Complete <http://libcxx.llvm.org/cxx1y_status.html>`__
-* `C++1z - In Progress <http://libcxx.llvm.org/cxx1z_status.html>`__
+* `C++17 - In Progress <http://libcxx.llvm.org/cxx1z_status.html>`__
* `Post C++14 Technical Specifications - In Progress <http://libcxx.llvm.org/ts1z_status.html>`__
+* :ref:`C++ Feature Test Macro Status <feature-status>`
Notes and Known Issues
----------------------
@@ -135,6 +142,7 @@ Design Documents
DesignDocs/VisibilityMacros
DesignDocs/ThreadingSupportAPI
DesignDocs/FileTimeType
+ DesignDocs/FeatureTestMacros
* `<atomic> design <http://libcxx.llvm.org/atomic_design.html>`_
* `<type_traits> design <http://libcxx.llvm.org/type_traits_design.html>`_
@@ -160,21 +168,18 @@ and `Getting started with LLVM <http://llvm.org/docs/GettingStarted.html>`__.
If you think you've found a bug in libc++, please report it using
the `LLVM Bugzilla`_. If you're not sure, you
-can post a message to the `cfe-dev mailing list`_ or on IRC.
-Please include "libc++" in your subject.
+can post a message to the `libcxx-dev mailing list`_ or on IRC.
**Patches**
If you want to contribute a patch to libc++, the best place for that is
-`Phabricator <http://llvm.org/docs/Phabricator.html>`_. Please include [libcxx] in the subject and
-add `cfe-commits` as a subscriber. Also make sure you are subscribed to the
-`cfe-commits mailing list <http://lists.llvm.org/mailman/listinfo/cfe-commits>`_.
+`Phabricator <http://llvm.org/docs/Phabricator.html>`_. Please add `libcxx-commits` as a subscriber.
+Also make sure you are subscribed to the `libcxx-commits mailing list <http://lists.llvm.org/mailman/listinfo/libcxx-commits>`_.
**Discussion and Questions**
Send discussions and questions to the
-`cfe-dev mailing list <http://lists.llvm.org/mailman/listinfo/cfe-dev>`_.
-Please include [libcxx] in the subject.
+`libcxx-dev mailing list <http://lists.llvm.org/mailman/listinfo/libcxx-dev>`_.
@@ -183,7 +188,7 @@ Quick Links
* `LLVM Homepage <http://llvm.org/>`_
* `libc++abi Homepage <http://libcxxabi.llvm.org/>`_
* `LLVM Bugzilla <https://bugs.llvm.org/>`_
-* `cfe-commits Mailing List`_
-* `cfe-dev Mailing List`_
+* `libcxx-commits Mailing List`_
+* `libcxx-dev Mailing List`_
* `Browse libc++ -- SVN <http://llvm.org/svn/llvm-project/libcxx/trunk/>`_
* `Browse libc++ -- ViewVC <http://llvm.org/viewvc/llvm-project/libcxx/trunk/>`_