
After D137870, LLVM_TARGET_TRIPLE is no longer defined on the runtime path into compiler-rt. This patch creates a common block of code to set LLVM_TARGET_TRIPLE equal to the default for both the llvm- and runtime- paths. Differential Revision: https://reviews.llvm.org/D138864
14 lines
612 B
CMake
14 lines
612 B
CMake
macro(set_llvm_target_triple)
|
|
set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE_default}" CACHE STRING
|
|
"Default target for which LLVM will generate code." )
|
|
if (TARGET_TRIPLE)
|
|
message(WARNING "TARGET_TRIPLE is deprecated and will be removed in a future release. "
|
|
"Please use LLVM_DEFAULT_TARGET_TRIPLE instead.")
|
|
set(LLVM_TARGET_TRIPLE "${TARGET_TRIPLE}")
|
|
else()
|
|
set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
|
|
endif()
|
|
message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
|
|
message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
|
|
endmacro()
|