diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -76,6 +76,12 @@ 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 --- a/llvm/docs/CMake.rst +++ b/llvm/docs/CMake.rst @@ -485,19 +485,20 @@ **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 `_. 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 --- a/llvm/docs/GettingStarted.rst +++ b/llvm/docs/GettingStarted.rst @@ -63,11 +63,10 @@ * ``-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