diff --git a/libcxx/docs/Contributing.rst b/libcxx/docs/Contributing.rst --- a/libcxx/docs/Contributing.rst +++ b/libcxx/docs/Contributing.rst @@ -61,18 +61,6 @@ consists of frequent libc++ contributors with a good understanding of the project's guidelines -- if you would like to be added to it, please reach out on Discord. -Post-release check list -======================= - -After branching for an LLVM release: - -1. Update ``_LIBCPP_VERSION`` in ``libcxx/include/__config`` -2. Update the version number in ``libcxx/docs/conf.py`` -3. Update ``_LIBCPPABI_VERSION`` in ``libcxxabi/include/cxxabi.h`` -4. Update ``_LIBUNWIND_VERSION`` in ``libunwind/include/__libunwind_config.h`` -5. Update the list of supported clang versions in ``libcxx/docs/index.rst`` -6. Remove the in-progress warning from ``libcxx/docs/ReleaseNotes.rst`` - Exporting new symbols from the library ====================================== diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -98,6 +98,18 @@ Upcoming Deprecations and Removals ---------------------------------- +LLVM 18 +~~~~~~~ + +- The base template for ``std::char_traits`` has been marked as deprecated and + will be removed in LLVM 18. If you are using ``std::char_traits`` with types + other than ``char``, ``wchar_t``, ``char8_t``, ``char16_t``, ``char32_t`` or + a custom character type for which you specialized ``std::char_traits``, your code + will stop working when we remove the base template. The Standard does not + mandate that a base template is provided, and such a base template is bound + to be incorrect for some types, which could currently cause unexpected + behavior while going undetected. + - The ``_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED`` macro will not be honored anymore in LLVM 18. Please see the updated documentation about the safe libc++ mode and in particular the ``_LIBCPP_VERBOSE_ABORT`` macro for details. diff --git a/libcxx/docs/ReleaseProcedure.rst b/libcxx/docs/ReleaseProcedure.rst new file mode 100644 --- /dev/null +++ b/libcxx/docs/ReleaseProcedure.rst @@ -0,0 +1,88 @@ +.. _ReleaseProcedure: + +================= +Release procedure +================= + +The LLVM project creates a new release twice a year following a fixed +`schedule `__. +This page describes the libc++ procedure for that release. + +Prepare the release +=================== + +This is done by the libc++ developers. + +It should be finished before the Release managers start branching the new +release: + +* Make sure the ``libcxx/docs/ReleaseNotes.rst`` is up to date. Typically + this file is updated when contributing patches. Still there might be some + information added regarding the general improvements of larger projects. + +* Make sure the deprecated features on this page are up to date. Typically a + new deprecated feature should be added to the release notes and this page. + However this should be verified so removals won't get forgotten. + +* Make sure the latest Unicode version is used. The C++ Standard + `refers to the Unicode Standard `__ + + ``The Unicode Consortium. The Unicode Standard. Available from: https://www.unicode.org/versions/latest/`` + + Typically the Unicode Consortium has one release per year. The libc++ + format library uses the Unicode Standard. Libc++ should be updated to the + latest Unicode version. Updating means using the latest data files and, if + needed, adapting the code to changes in the Unicode Standard. + +* Make sure all libc++ supported compilers in the CI are updated to their + latest release. + +Branching +========= + +This is done by the LLVM Release managers. + +After branching for an LLVM release: + +1. Update ``_LIBCPP_VERSION`` in ``libcxx/include/__config`` +2. Update the version number in ``libcxx/docs/conf.py`` +3. Update ``_LIBCPPABI_VERSION`` in ``libcxxabi/include/cxxabi.h`` +4. Update ``_LIBUNWIND_VERSION`` in ``libunwind/include/__libunwind_config.h`` +5. Remove the in-progress warning from ``libcxx/docs/ReleaseNotes.rst`` + +Post branching +============== + +This is done by the libc++ developers. + +After branching it takes a couple of days before the new LLVM ToT version is +available on ``_. Once it is available the pre-commit CI +can start using the new ToT version. In order to make sure patches can be +backported to the release branch the oldest compiler is not removed yet. + +The section ``Upcoming Deprecations and Removals`` is cleared by the release +managers. Copy back the items that were in this section. + +The items that need changing are marked with ``LLVM POST-BRANCH``. + +Post release +============ + +This is done by the libc++ developers. + +Support for the ToT - 3 version is removed: + +- Search for ``LLVM RELEASE`` and address their comments +- Search for test that have ``UNSUPPORTED`` or ``XFAIL`` for the no longer supported version +- Search for ``TODO(LLVM-)`` and address their comments + +Removal of deprecated features +============================== + +The typical libc++ pattern to remove support for a feature is: + +- deprecate a feature in release ``X``, +- remove that feature in release ``X + 2``. + +This section keeps track of which features are slated for removal. These are +copied from the release notes. diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst --- a/libcxx/docs/index.rst +++ b/libcxx/docs/index.rst @@ -39,6 +39,7 @@ BuildingLibcxx TestingLibcxx Contributing + ReleaseProcedure Status/Cxx14 Status/Cxx17 Status/Cxx20 @@ -94,6 +95,9 @@ Further, both projects are apparently abandoned: STLport 5.2.1 was released in Oct'08, and STDCXX 4.2.1 in May'08. +.. + LLVM RELEASE bump version + .. _SupportedPlatforms: Platform and Compiler Support diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h --- a/libcxx/include/__memory/allocator_traits.h +++ b/libcxx/include/__memory/allocator_traits.h @@ -412,7 +412,7 @@ # if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1600 : true_type {}; # else - // TODO LLVM18: Remove the special-casing + // TODO(LLVM-18): Remove the special-casing : false_type {}; # endif diff --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h --- a/libcxx/include/__string/char_traits.h +++ b/libcxx/include/__string/char_traits.h @@ -73,7 +73,7 @@ // // Temporary extension to provide a base template for std::char_traits. -// TODO: Remove in LLVM 18. +// TODO(LLVM-18): Remove this class. // template struct _LIBCPP_DEPRECATED_("char_traits for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period. It will be removed in LLVM 18, so please migrate off of it.") diff --git a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp --- a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp +++ b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp @@ -30,7 +30,7 @@ int main(int, char**) { #if TEST_STD_VER >= 11 && TEST_CLANG_VER >= 1600 - // TODO LLVM18: Remove the special-casing + // TODO(LLVM-18): Remove the special-casing { typedef int T; typedef cpp17_input_iterator MyInputIter; diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile --- a/libcxx/utils/ci/Dockerfile +++ b/libcxx/utils/ci/Dockerfile @@ -66,6 +66,7 @@ # LLVM 15, we still need to have Clang 12 in this Docker image because the LLVM # 14 release branch CI uses it. The tip-of-trunk CI will never use Clang 12, # though. +# LLVM POST-BRANCH bump version ENV LLVM_HEAD_VERSION=17 RUN apt-get update && apt-get install -y lsb-release wget software-properties-common RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh @@ -84,12 +85,12 @@ RUN apt-get update && apt-get install -y clang-format-$(($LLVM_HEAD_VERSION - 2)) clang-format-$(($LLVM_HEAD_VERSION - 1)) # Install clang-tidy -# TODO LLVM 17 revert D148831 to only install $(($LLVM_HEAD_VERSION - 1)) and $LLVM_HEAD_VERSION +# TODO(LLVM-17) revert D148831 to only install $(($LLVM_HEAD_VERSION - 1)) and $LLVM_HEAD_VERSION # The usage of the ToT version is needed due to module issues with Clang 16 RUN apt-get update && apt-get install -y clang-tidy-$(($LLVM_HEAD_VERSION - 2)) clang-tidy-$(($LLVM_HEAD_VERSION - 1)) clang-tidy-$LLVM_HEAD_VERSION # Install llvm-dev and libclang-dev to compile custom clang-tidy checks -# TODO LLVM 17 revert D148831 to only install $(($LLVM_HEAD_VERSION - 1)) and $LLVM_HEAD_VERSION +# TODO(LLVM-17) revert D148831 to only install $(($LLVM_HEAD_VERSION - 1)) and $LLVM_HEAD_VERSION # The usage of the ToT version is needed due to module issues with Clang 16 RUN apt-get update && apt-get install -y llvm-$(($LLVM_HEAD_VERSION - 2))-dev llvm-$(($LLVM_HEAD_VERSION - 1))-dev llvm-$LLVM_HEAD_VERSION-dev \ libclang-$(($LLVM_HEAD_VERSION - 2))-dev libclang-$(($LLVM_HEAD_VERSION - 1))-dev libclang-$LLVM_HEAD_VERSION-dev diff --git a/libcxx/utils/ci/buildkite-pipeline-clang.yml b/libcxx/utils/ci/buildkite-pipeline-clang.yml --- a/libcxx/utils/ci/buildkite-pipeline-clang.yml +++ b/libcxx/utils/ci/buildkite-pipeline-clang.yml @@ -14,6 +14,7 @@ # in various configurations. # env: + # LLVM RELEASE bump version LLVM_HEAD_VERSION: "17" steps: - label: "Building clang" diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -23,6 +23,9 @@ # Theses numbers are available in all runners, making it easier to update the # version number. env: + # LLVM POST-BRANCH bump version + # LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17" + # LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15" LLVM_STABLE_VERSION: "16" LLVM_HEAD_VERSION: "17" GCC_STABLE_VERSION: "12" @@ -265,7 +268,7 @@ env: CC: "clang-15" CXX: "clang++-15" - # TODO LLVM18: Enable clang-tidy + # TODO(LLVM-18): Enable clang-tidy # ENABLE_CLANG_TIDY: "On" agents: queue: "libcxx-builders" diff --git a/libcxx/utils/generate_header_tests.py b/libcxx/utils/generate_header_tests.py --- a/libcxx/utils/generate_header_tests.py +++ b/libcxx/utils/generate_header_tests.py @@ -19,7 +19,7 @@ "filesystem": "!defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)", - # TODO LLVM17: simplify this to __cplusplus >= 202002L + # TODO(LLVM-17): simplify this to __cplusplus >= 202002L "coroutine": "(defined(__cpp_impl_coroutine) && __cpp_impl_coroutine >= 201902L) || (defined(__cpp_coroutines) && __cpp_coroutines >= 201703L)", "clocale": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)", diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -26,9 +26,11 @@ return None # TODO This should be the last stable release. + # LLVM RELEASE bump version if runScriptExitCode(cfg, ['clang-tidy-16 --version']) == 0: return 'clang-tidy-16' + # LLVM RELEASE bump version if int(re.search('[0-9]+', commandOutput(cfg, ['clang-tidy --version'])).group()) >= 16: return 'clang-tidy'