[PATCH] D56819: Document toolchain update policy
JF Bastien via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 16 15:35:05 PST 2019
jfb created this revision.
Herald added subscribers: llvm-commits, dexonsmith, jkorous.
Capture the current agreed-upon toolchain update policy based on the following
discussions:
- LLVM dev meeting 2018 BoF "Migrating to C++14, and beyond!" llvm.org/devmtg/2018-10/talk-abstracts.html#bof3
- A Short Policy Proposal Regarding Host Compilers lists.llvm.org/pipermail/llvm-dev/2018-May/123238.html
- Using C++14 code in LLVM (2018) lists.llvm.org/pipermail/llvm-dev/2018-May/123182.html
- Using C++14 code in LLVM (2017) lists.llvm.org/pipermail/llvm-dev/2017-October/118673.html
- Using C++14 code in LLVM (2016) lists.llvm.org/pipermail/llvm-dev/2016-October/105483.html
- Document and Enforce new Host Compiler Policy llvm.org/D47073 <https://reviews.llvm.org/D47073>
- Require GCC 5.1 and LLVM 3.5 at a minimum llvm.org/D46723 <https://reviews.llvm.org/D46723>
Repository:
rL LLVM
https://reviews.llvm.org/D56819
Files:
docs/GettingStarted.rst
Index: docs/GettingStarted.rst
===================================================================
--- docs/GettingStarted.rst
+++ docs/GettingStarted.rst
@@ -220,15 +220,16 @@
------------------------------------------------------
LLVM is very demanding of the host C++ compiler, and as such tends to expose
-bugs in the compiler. We are also planning to follow improvements and
-developments in the C++ language and library reasonably closely. As such, we
-require a modern host C++ toolchain, both compiler and standard library, in
-order to build LLVM.
+bugs in the compiler. We also attempt to follow improvements and developments in
+the C++ language and library reasonably closely. As such, we require a modern
+host C++ toolchain, both compiler and standard library, in order to build LLVM.
-For the most popular host toolchains we check for specific minimum versions in
-our build systems:
+LLVM is currently written using the subset of C++ documented in :doc:`coding
+standards<CodingStandards>`. To enforce this language version, we check the most
+popular host toolchains for specific minimum versions in our build systems:
* Clang 3.1
+* Apple Clang 3.1
* GCC 4.8
* Visual Studio 2015 (Update 3)
@@ -259,6 +260,41 @@
symptom is an error about cyclic dependencies. We recommend upgrading to a
newer version of Gold.
+We intend to require newer toolchains as time goes by. This means LLVM's
+codebase can use newer versions of C++ as they get standardized. Requiring newer
+toolchains to build LLVM can be painful for those building LLVM, it will
+therefore only be done through the following process:
+
+ * Generally, try to support LLVM and GCC versions from the last 3 years at a
+ minimum. This time-based guideline is not strict: we may support much older
+ compilers, or decide to support fewer ones.
+
+ * An RFC is sent to the `llvm-dev mailing list <http://lists.llvm.org/mailman/listinfo/llvm-dev>`_
+
+ - Detail upsides of the version increase (e.g. allow LLVM to use newer C++
+ language or library features; avoid miscompiles in particular compiler
+ versions, etc).
+ - Detail downsides on important platforms (e.g. Ubuntu LTS status).
+
+ * Once the RFC reaches consensus, update the CMake toolchain version checks
+ and this document. We want to soft-error when developers compile LLVM. We
+ say "soft-error" because the error can be turned into a warning using a
+ CMake flag. This is an important step: LLVM still doesn't have code which
+ requires the new toolchains, but it soon will. If you compile LLVM but don't
+ read the mailing list, we should tell you!
+
+ * Ensure that at least one LLVM release has had this soft-error. Not all
+ developers compile LLVM tip-of-tree. These release-bound developers should
+ also be told about upcoming changes.
+
+ * Turn the soft-error into a hard-error after said LLVM release has branched.
+
+ * Update the :doc:`coding standards<CodingStandards>` to explicitly allow the
+ new features we've now unlocked.
+
+ * Start using the new features in LLVM's codebase.
+
+
Getting a Modern Host C++ Toolchain
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -336,7 +372,7 @@
from the loader similar to ``libstdc++.so.6: version `GLIBCXX_3.4.20' not
found``. This means you need to tweak the -rpath linker flag.
-When you build Clang, you will need to give *it* access to modern C++11
+When you build Clang, you will need to give *it* access to modern C++
standard library in order to use it as your new host in part of a bootstrap.
There are two easy ways to do this, either build (and install) libc++ along
with Clang and then use it with the ``-stdlib=libc++`` compile and link flag,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56819.182174.patch
Type: text/x-patch
Size: 3727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190116/9ea0b161/attachment.bin>
More information about the llvm-commits
mailing list