[llvm] 176db3b - [RFC] Remove support for building C++ with `LLVM_ENABLE_PROJECTS`

John Ericson via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 21 05:11:04 PDT 2022


Author: John Ericson
Date: 2022-08-21T08:10:56-04:00
New Revision: 176db3b3ab25ff8a9b2405f50ef5a8bd9304a6d5

URL: https://github.com/llvm/llvm-project/commit/176db3b3ab25ff8a9b2405f50ef5a8bd9304a6d5
DIFF: https://github.com/llvm/llvm-project/commit/176db3b3ab25ff8a9b2405f50ef5a8bd9304a6d5.diff

LOG: [RFC] Remove support for building C++ with `LLVM_ENABLE_PROJECTS`

This has been officially deprecated since D112724, meaning the
deprecation warning is present in released 14 and 15.

This makes me think that now, shortly after the 15 release is branched,
is a good time to pull the trigger.

Reviewed By: phosek

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

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Linux.cpp
    compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
    libcxx/utils/ci/buildkite-pipeline.yml
    libcxx/utils/ci/oss-fuzz.sh
    libcxx/utils/ci/run-buildbot
    llvm/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
index ceb1a982c3a4c..eedbb12d0dd53 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -307,13 +307,6 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
 
   Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths);
 
-  // The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs
-  // libc++.so in D.Dir+"/../lib/". Detect this path.
-  // TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported.
-  if (StringRef(D.Dir).startswith(SysRoot) &&
-      D.getVFS().exists(D.Dir + "/../lib/libc++.so"))
-    addPathIfExists(D, D.Dir + "/../lib", Paths);
-
   addPathIfExists(D, concat(SysRoot, "/lib"), Paths);
   addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths);
 }

diff  --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
index 0386be5b76e7d..3fe8e45bfcbc8 100755
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
@@ -100,12 +100,12 @@ if [[ ! -d ${LIBCXX_BUILD} ]]; then
   mkdir -p ${LIBCXX_BUILD}
   cd ${LIBCXX_BUILD}
   LIBCXX_FLAGS="${FLAGS} -Wno-macro-redefined"
-  PROJECTS=
+  RUNTIMES=
   if [[ ! -d $LLVM_SRC/projects/libcxxabi ]] ; then
-    PROJECTS="-DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi'"
+    RUNTIMES="-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi'"
   fi
   cmake -GNinja \
-    ${PROJECTS} \
+    ${RUNTIMES} \
     -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_C_COMPILER=$CC \
     -DCMAKE_CXX_COMPILER=$CXX \

diff  --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 8e804552f3591..bf9db29ce7f59 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -321,20 +321,6 @@ steps:
             limit: 2
       timeout_in_minutes: 120
 
-    - label: "Legacy LLVM_ENABLE_PROJECTS build"
-      command: "libcxx/utils/ci/run-buildbot legacy-project-build"
-      artifact_paths:
-        - "**/test-results.xml"
-        - "**/*.abilist"
-      agents:
-        queue: "libcxx-builders"
-        os: "linux"
-      retry:
-        automatic:
-          - exit_status: -1  # Agent was lost
-            limit: 2
-      timeout_in_minutes: 120
-
   # Tests with various build configurations.
   - label: "Static libraries"
     command: "libcxx/utils/ci/run-buildbot generic-static"

diff  --git a/libcxx/utils/ci/oss-fuzz.sh b/libcxx/utils/ci/oss-fuzz.sh
index 12149de87ce5b..123ac47fc449b 100755
--- a/libcxx/utils/ci/oss-fuzz.sh
+++ b/libcxx/utils/ci/oss-fuzz.sh
@@ -13,7 +13,7 @@ INSTALL=cxx_install_dir
 
 mkdir ${BUILD}
 cmake -S ${PWD} -B ${BUILD} \
-      -DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
+      -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
       -DCMAKE_BUILD_TYPE=RelWithDebInfo \
       -DCMAKE_INSTALL_PREFIX="${INSTALL}"
 cmake --build ${BUILD} --target install-cxx-headers

diff  --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 27431f3c2cac8..220082c1209c8 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -510,21 +510,6 @@ legacy-test-config)
                    -DLIBUNWIND_TEST_CONFIG="${MONOREPO_ROOT}/libunwind/test/lit.site.cfg.in"
     check-runtimes
 ;;
-legacy-project-build)
-    clean
-
-    echo "--- Generating CMake"
-    ${CMAKE} \
-          -S "${MONOREPO_ROOT}/llvm" \
-          -B "${BUILD_DIR}" \
-          -DLLVM_ENABLE_PROJECTS="libcxx;libunwind;libcxxabi" \
-          -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
-          -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-          -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-          -DLLVM_LIT_ARGS="-sv --show-unsupported --xunit-xml-output test-results.xml --timeout=1500" \
-          -DLIBCXX_CXX_ABI=libcxxabi
-    check-runtimes
-;;
 aarch64)
     clean
     generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake"

diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 7897a919701a6..de13ab0df24ec 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -123,8 +123,9 @@ foreach(proj ${LLVM_ENABLE_PROJECTS})
 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.")
+    message(FATAL_ERROR
+      "Using LLVM_ENABLE_PROJECTS=${proj} is incorrect. Please use -DLLVM_ENABLE_RUNTIMES=${proj} or "
+      "see the instructions at https://libcxx.llvm.org/BuildingLibcxx.html for building the runtimes.")
   endif()
 endforeach()
 


        


More information about the llvm-commits mailing list