[llvm] Document Policy on supporting newer C++ standard in LLVM codebase (PR #156823)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 01:25:10 PDT 2025
https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/156823
See RFC: https://discourse.llvm.org/t/policy-on-supporting-newer-c-standard-in-llvm-codebase/88114
>From 7b8fe092cef03c4b1ffe7109b24bb862fb7d9dfa Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Thu, 4 Sep 2025 01:24:11 -0700
Subject: [PATCH] Document Policy on supporting newer C++ standard in LLVM
codebase
See RFC: https://discourse.llvm.org/t/policy-on-supporting-newer-c-standard-in-llvm-codebase/88114
---
llvm/docs/CMake.rst | 4 ++--
llvm/docs/CodingStandards.rst | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
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..05a9e1ba84189 100644
--- a/llvm/docs/CodingStandards.rst
+++ b/llvm/docs/CodingStandards.rst
@@ -78,6 +78,10 @@ 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++ version can be used
+to build LLVM. However for most recent C++ version, the support is limited and
+we don't expect coverage beyond the latest version of the supported toolchains.
+
C++ Standard Library
--------------------
More information about the llvm-commits
mailing list