[llvm] 87a4e1c - Document Policy on supporting newer C++ standard in LLVM codebase (#156823)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 21 13:48:40 PDT 2025


Author: Mehdi Amini
Date: 2025-09-21T22:48:36+02:00
New Revision: 87a4e1ce3c0cfbc726a070717d0d5901289ee073

URL: https://github.com/llvm/llvm-project/commit/87a4e1ce3c0cfbc726a070717d0d5901289ee073
DIFF: https://github.com/llvm/llvm-project/commit/87a4e1ce3c0cfbc726a070717d0d5901289ee073.diff

LOG: Document Policy on supporting newer C++ standard in LLVM codebase (#156823)

See RFC:
https://discourse.llvm.org/t/policy-on-supporting-newer-c-standard-in-llvm-codebase/88114

Added: 
    

Modified: 
    llvm/docs/CMake.rst
    llvm/docs/CodingStandards.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index ce83552919315..438a84d39ed66 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -280,8 +280,8 @@ explanation and LLVM-related notes.  For full documentation, consult the CMake
 manual, or execute ``cmake --help-variable VARIABLE_NAME``.
 
 **CMAKE_CXX_STANDARD**:STRING
-  Sets the C++ standard to conform to when building LLVM.  Possible values are
-  17 and 20.  LLVM requires C++17 or higher.  This defaults to 17.
+  Sets the C++ standard to conform to when building LLVM.
+  LLVM requires C++17 or higher.  This defaults to 17.
 
 **CMAKE_INSTALL_BINDIR**:PATH
   The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.

diff  --git a/llvm/docs/CodingStandards.rst b/llvm/docs/CodingStandards.rst
index e48af0ee3054f..dd275f292967b 100644
--- a/llvm/docs/CodingStandards.rst
+++ b/llvm/docs/CodingStandards.rst
@@ -78,6 +78,12 @@ Each toolchain provides a good reference for what it accepts:
 Additionally, there are compiler comparison tables of supported C++ features on
 `cppreference.com <https://en.cppreference.com/w/cpp/compiler_support/17>`_.
 
+To keep track with the evolution of the standard, newer C++ versions can be used
+to build LLVM. However, our support focuses on the minimum supported C++
+version and a very recent standard may not yet be supported, or only using the
+latest version of the supported toolchains and possibly not across all the
+subprojects.
+
 
 C++ Standard Library
 --------------------


        


More information about the llvm-commits mailing list