Skip to content

Commit 7a249da

Browse files
authored
merge main into amd-staging (llvm#2153)
2 parents b07f1df + 835c91c commit 7a249da

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

compiler-rt/cmake/Modules/CompilerRTUtils.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,12 @@ macro(construct_compiler_rt_default_triple)
373373
message(STATUS "cmake c compiler target: ${CMAKE_C_COMPILER_TARGET}")
374374
set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${CMAKE_C_COMPILER_TARGET})
375375
else()
376-
set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} CACHE STRING
376+
set(target_triple ${LLVM_TARGET_TRIPLE})
377+
# AIX triples can have OS version numbers we don't want for the compiler-rt target.
378+
if (target_triple MATCHES "aix")
379+
string(REGEX REPLACE "[0-9.]+$" "" target_triple "${target_triple}")
380+
endif()
381+
set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${target_triple} CACHE STRING
377382
"Default triple for which compiler-rt runtimes will be built.")
378383
endif()
379384

llvm/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -992,14 +992,13 @@ endif()
992992
set(LLVM_TARGET_TRIPLE_ENV CACHE STRING "The name of environment variable to override default target. Disabled by blank.")
993993
mark_as_advanced(LLVM_TARGET_TRIPLE_ENV)
994994

995-
#if(CMAKE_SYSTEM_NAME MATCHES "BSD|Linux|OS390")
996-
# set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
997-
#else()
998-
# set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
999-
#endif()
1000-
#set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default} CACHE BOOL
1001-
# "Enable per-target runtimes directory")
1002-
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL
995+
if(CMAKE_SYSTEM_NAME MATCHES "BSD|Linux|OS390|AIX")
996+
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
997+
else()
998+
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
999+
endif()
1000+
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default OFF)
1001+
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default} CACHE BOOL
10031002
"Enable per-target runtimes directory")
10041003

10051004
set(LLVM_PROFDATA_FILE "" CACHE FILEPATH

llvm/runtimes/CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ endfunction()
7373
macro(set_enable_per_target_runtime_dir)
7474
# May have been set by llvm/CMakeLists.txt.
7575
if (NOT DEFINED LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
76-
# AIX should fold 32-bit & 64-bit arch libraries into a single archive.
77-
if (LLVM_TARGET_TRIPLE MATCHES "aix")
78-
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF)
79-
else()
80-
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON)
81-
endif()
76+
set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON)
8277
endif()
8378
endmacro()
8479

0 commit comments

Comments
 (0)