Skip to content

Commit e4f3a85

Browse files
committed
Add the same code to runtimes/CMakeLists.txt. Also add a warning message.
1 parent b4a0154 commit e4f3a85

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

llvm/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,11 @@ if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
12021202
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -shared")
12031203

12041204
# Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't support it
1205-
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "" FORCE)
1205+
if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
1206+
message(WARNING
1207+
"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON is not supported on AIX. LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is set to OFF.")
1208+
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "" FORCE)
1209+
endif()
12061210
endif()
12071211

12081212
# Build with _XOPEN_SOURCE on z/OS.

runtimes/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ endif()
223223
# This can be used to detect whether we're in the runtimes build.
224224
set(LLVM_RUNTIMES_BUILD ON)
225225

226+
if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
227+
# Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't support it
228+
message(WARNING
229+
"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON is not supported on AIX. LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is set to OFF.")
230+
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "" FORCE)
231+
endif()
232+
226233
foreach(entry ${runtimes})
227234
get_filename_component(projName ${entry} NAME)
228235

0 commit comments

Comments
 (0)