[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 25 00:50:05 PDT 2024
================
@@ -181,6 +181,20 @@ message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
+if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ set(print_target_triple ${CMAKE_CXX_COMPILER} --target=${LLVM_RUNTIME_TRIPLE} -print-target-triple)
+ execute_process(COMMAND ${print_target_triple}
+ RESULT_VARIABLE result
+ OUTPUT_VARIABLE output
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(result EQUAL 0)
+ set(LLVM_RUNTIME_TRIPLE ${output})
----------------
petrhosek wrote:
Thanks for catching this, it was replaced by `LLVM_DEFAULT_TARGET_TRIPLE`.
https://github.com/llvm/llvm-project/pull/89425
More information about the cfe-commits
mailing list