File tree Expand file tree Collapse file tree 3 files changed +14
-15
lines changed
compiler-rt/cmake/Modules Expand file tree Collapse file tree 3 files changed +14
-15
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -992,14 +992,13 @@ endif()
992992set (LLVM_TARGET_TRIPLE_ENV CACHE STRING "The name of environment variable to override default target. Disabled by blank." )
993993mark_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
10051004set (LLVM_PROFDATA_FILE "" CACHE FILEPATH
Original file line number Diff line number Diff line change @@ -73,12 +73,7 @@ endfunction()
7373macro (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 ()
8378endmacro ()
8479
You can’t perform that action at this time.
0 commit comments