[llvm] [AIX][CMake] Disable `openmp` as LLVM_ENABLE_PROJECTS (PR #110152)

Daniel Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 12:00:19 PDT 2024


https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/110152

>From d6bf8296edcea4d1b96e167352d8f3e3849c6b6b Mon Sep 17 00:00:00 2001
From: Daniel Chen <cdchen at ca.ibm.com>
Date: Thu, 26 Sep 2024 14:09:40 -0400
Subject: [PATCH 1/2] Disable openmp as LLVM_ENABLE_PROJECTS in favor of
 LLVM_ENABLE_RUNTIMES on AIX.

---
 llvm/CMakeLists.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 0044c38f566a78..27f4b0a8796274 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -117,6 +117,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.
 set(LLVM_ALL_PROJECTS "bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;lld;lldb;mlir;openmp;polly;pstl")
+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()
+
+# The flang project is not yet part of "all" projects (see C++ requirements)
 # The flang project is not yet part of "all" projects (see C++ requirements)
 set(LLVM_EXTRA_PROJECTS "flang")
 # List of all known projects in the mono repo

>From 0b58328da3f51c7e57537a50488144e22e16b04c Mon Sep 17 00:00:00 2001
From: Daniel Chen <cdchen at ca.ibm.com>
Date: Thu, 26 Sep 2024 15:00:00 -0400
Subject: [PATCH 2/2] Remove the dup line to address review comment.

---
 llvm/CMakeLists.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 27f4b0a8796274..56ee6b6fd7643b 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -123,7 +123,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "AIX")
   list(REMOVE_ITEM LLVM_ALL_PROJECTS openmp)
 endif()
 
-# The flang project is not yet part of "all" projects (see C++ requirements)
 # The flang project is not yet part of "all" projects (see C++ requirements)
 set(LLVM_EXTRA_PROJECTS "flang")
 # List of all known projects in the mono repo



More information about the llvm-commits mailing list