[llvm-branch-commits] [llvm] Backport '[CMake] Update "all" project/runtimes (#179270)' to 22.x (PR #182090)
Calvin Owens via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 6 11:50:39 PST 2026
https://github.com/jcalvinowens updated https://github.com/llvm/llvm-project/pull/182090
>From 128413efe2c9a1cc75ba650d45c57dad8f9ed840 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Tue, 3 Feb 2026 11:13:36 +0100
Subject: [PATCH] [CMake] Update "all" project/runtimes (#179270)
Move compiler-rt from "all" projects to "all" runtimes and add "openmp"
to "all" runtimes, as it was recently removed from "all" projects.
(cherry picked from commit 6d15d1c611d4f2362c89fa852fd385e1f2116af9)
[ Add "openmp" to LLVM_EXTRA_PROJECTS -- Calvin ]
Signed-off-by: Calvin Owens <calvin at wbinvd.org>
---
llvm/CMakeLists.txt | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index fcbfed4953832..cf9009a32b7e4 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -104,19 +104,13 @@ endif()
# This allows an easy way of setting up a build directory for llvm and another
# one for llvm+clang+... using the same sources.
# These projects will be included when "all" is included in LLVM_ENABLE_PROJECTS.
-set(LLVM_ALL_PROJECTS "bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libclc;lld;lldb;mlir;openmp;polly")
-if ("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
- # Disallow 'openmp' as a LLVM PROJECT on AIX as the supported way is to use
- # LLVM_ENABLE_RUNTIMES.
- list(REMOVE_ITEM LLVM_ALL_PROJECTS openmp)
-endif()
+set(LLVM_ALL_PROJECTS "bolt;clang;clang-tools-extra;cross-project-tests;libclc;lld;lldb;mlir;polly")
-# The "libc" project, which is not part of "all" projects, could be included in
-# LLVM_ENABLE_PROJECTS. It is preferred to include "libc" in
-# LLVM_ENABLE_RUNTIMES instead of LLVM_ENABLE_PROJECTS.
+# The libc and compiler-rt projects are not part of LLVM_ALL_PROJECTS, because
+# it is preferred to use LLVM_ENABLE_RUNTIMES for them instead.
#
# The flang project is not yet part of "all" projects (see C++ requirements).
-set(LLVM_EXTRA_PROJECTS "flang" "libc")
+set(LLVM_EXTRA_PROJECTS "flang" "libc" "compiler-rt" "openmp")
# List of all known projects in the mono repo
set(LLVM_KNOWN_PROJECTS "${LLVM_ALL_PROJECTS};${LLVM_EXTRA_PROJECTS}")
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
@@ -136,7 +130,7 @@ endforeach()
#
# As we migrate runtimes to using the bootstrapping build, the set of default runtimes
# should grow as we remove those runtimes from LLVM_ENABLE_PROJECTS above.
-set(LLVM_DEFAULT_RUNTIMES "libcxx;libcxxabi;libunwind")
+set(LLVM_DEFAULT_RUNTIMES "libcxx;libcxxabi;libunwind;compiler-rt;openmp")
set(LLVM_SUPPORTED_RUNTIMES "libc;libunwind;libcxxabi;libcxx;compiler-rt;openmp;llvm-libgcc;offload;flang-rt;libclc;libsycl;orc-rt")
set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
"Semicolon-separated list of runtimes to build, or \"all\" (${LLVM_DEFAULT_RUNTIMES}). Supported runtimes are ${LLVM_SUPPORTED_RUNTIMES}.")
More information about the llvm-branch-commits
mailing list