[llvm] 2912f53 - Officially deprecate LLVM_ENABLE_PROJECTS for libc++, libc++abi and libunwind

Louis Dionne via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 29 05:53:16 PDT 2021


Author: Louis Dionne
Date: 2021-10-29T08:53:03-04:00
New Revision: 2912f53699da704246a3320b87bc526340a370d2

URL: https://github.com/llvm/llvm-project/commit/2912f53699da704246a3320b87bc526340a370d2
DIFF: https://github.com/llvm/llvm-project/commit/2912f53699da704246a3320b87bc526340a370d2.diff

LOG: Officially deprecate LLVM_ENABLE_PROJECTS for libc++, libc++abi and libunwind

This updates the LLVM wide documentation for building LLVM and the runtimes
and adds a CMake warning when folks specify libcxx, libcxxabi or libunwind
in LLVM_ENABLE_PROJECTS, pointing them to the updated instructions for
building the runtimes.

Differential Revision: https://reviews.llvm.org/D112724

Added: 
    

Modified: 
    llvm/CMakeLists.txt
    llvm/docs/CMake.rst
    llvm/docs/GettingStarted.rst

Removed: 
    


################################################################################
diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 67bc796768d61..f07f29a5378b0 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -76,6 +76,12 @@ foreach(proj ${LLVM_ENABLE_PROJECTS})
      MESSAGE(FATAL_ERROR "${proj} isn't a known project: ${LLVM_KNOWN_PROJECTS}")
   endif()
 endforeach()
+foreach(proj "libcxx" "libcxxabi" "libunwind")
+  if (${proj} IN_LIST LLVM_ENABLE_PROJECTS)
+    message(WARNING "Using LLVM_ENABLE_PROJECTS=${proj} is deprecated now, please use -DLLVM_ENABLE_RUNTIMES=${proj} or "
+                    "see the instructions at https://libcxx.llvm.org/BuildingLibcxx.html for building the runtimes.")
+  endif()
+endforeach()
 
 if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
   set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS})

diff  --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 658484f7fd5c6..72d303e60fda4 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -485,19 +485,20 @@ enabled sub-projects. Nearly all of these variable names begin with
 
 **LLVM_ENABLE_PROJECTS**:STRING
   Semicolon-separated list of projects to build, or *all* for building all
-  (clang, libcxx, libcxxabi, lldb, compiler-rt, lld, polly, etc) projects.
-  This flag assumes that projects are checked out side-by-side and not nested,
-  i.e. clang needs to be in parallel of llvm instead of nested in `llvm/tools`.
+  (clang, lldb, compiler-rt, lld, polly, etc) projects. This flag assumes
+  that projects are checked out side-by-side and not nested, i.e. clang
+  needs to be in parallel of llvm instead of nested in `llvm/tools`.
   This feature allows to have one build for only LLVM and another for clang+llvm
   using the same source checkout.
   The full list is:
-  ``clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;libcxx;libcxxabi;libunwind;lld;lldb;openmp;polly;pstl``
+  ``clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;lld;lldb;openmp;polly;pstl``
 
 **LLVM_ENABLE_RUNTIMES**:STRING
   Build libc++, libc++abi or other projects using that a just-built compiler.
   This is the correct way to build libc++ when putting together a toolchain.
   It will build the builtins separately from the other runtimes to preserve
-  correct dependency ordering.
+  correct dependency ordering. If you want to build the runtimes using a system
+  compiler, see the `libc++ documentation <https://libcxx.llvm.org/BuildingLibcxx.html>`_.
   Note: the list should not have duplicates with `LLVM_ENABLE_PROJECTS`.
   The full list is:
   ``compiler-rt;libc;libcxx;libcxxabi;libunwind;openmp``

diff  --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst
index 521c0010b7dc4..d4df15ddf2e23 100644
--- a/llvm/docs/GettingStarted.rst
+++ b/llvm/docs/GettingStarted.rst
@@ -63,11 +63,10 @@ This is an example workflow and configuration to get and build the LLVM source:
 
      * ``-DLLVM_ENABLE_PROJECTS='...'`` --- semicolon-separated list of the LLVM
        subprojects you'd like to additionally build. Can include any of: clang,
-       clang-tools-extra, libcxx, libcxxabi, libunwind, lldb, compiler-rt, lld,
-       polly, or cross-project-tests.
+       clang-tools-extra, lldb, compiler-rt, lld, polly, or cross-project-tests.
 
        For example, to build LLVM, Clang, libcxx, and libcxxabi, use
-       ``-DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi"``.
+       ``-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi"``.
 
      * ``-DCMAKE_INSTALL_PREFIX=directory`` --- Specify for *directory* the full
        pathname of where you want the LLVM tools and libraries to be installed


        


More information about the llvm-commits mailing list