1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds.

Second attempt: Now with ';' -> '|' replacement.

On some platforms, certain runtimes are not supported. For runtimes builds of
those platforms it would be nice if we could disable certain runtimes (ie
libunwind on Windows).

Differential Revision: https://reviews.llvm.org/D67195

llvm-svn: 372784
This commit is contained in:
Puyan Lotfi 2019-09-24 22:38:18 +00:00
parent 8566ca7d16
commit 5a01f5b084

View File

@ -460,6 +460,11 @@ else() # if this is included from LLVM's CMake
endif() endif()
endforeach() endforeach()
if(NOT RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES)
string(REPLACE ";" "|" LLVM_ENABLE_RUNTIMES_PASSTHROUGH "${LLVM_ENABLE_RUNTIMES}")
list(APPEND ${name}_extra_args -DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES_PASSTHROUGH})
endif()
if(target IN_LIST LLVM_RUNTIME_BUILD_ID_LINK_TARGETS) if(target IN_LIST LLVM_RUNTIME_BUILD_ID_LINK_TARGETS)
list(APPEND EXTRA_ARGS STRIP_TOOL ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link) list(APPEND EXTRA_ARGS STRIP_TOOL ${CMAKE_CURRENT_BINARY_DIR}/llvm-strip-link)
endif() endif()
@ -482,7 +487,6 @@ else() # if this is included from LLVM's CMake
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
-DLLVM_RUNTIMES_TARGET=${name} -DLLVM_RUNTIMES_TARGET=${name}
${${name}_extra_args} ${${name}_extra_args}
PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objcopy llvm-objdump llvm-strip
EXTRA_TARGETS ${${name}_extra_targets} EXTRA_TARGETS ${${name}_extra_targets}
${${name}_test_targets} ${${name}_test_targets}