[compiler-rt] 5927492 - Revert "CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE" (#88663)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 14 09:12:45 PDT 2024
Author: YunQiang Su
Date: 2024-04-15T00:12:42+08:00
New Revision: 5927492e8e68c1ee5a0d84cf6c402a900aac4a3c
URL: https://github.com/llvm/llvm-project/commit/5927492e8e68c1ee5a0d84cf6c402a900aac4a3c
DIFF: https://github.com/llvm/llvm-project/commit/5927492e8e68c1ee5a0d84cf6c402a900aac4a3c.diff
LOG: Revert "CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE" (#88663)
Reverts llvm/llvm-project#88407
Added:
Modified:
compiler-rt/cmake/Modules/CompilerRTUtils.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 75f111efeb102f..e8e5f612d5b03c 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -362,22 +362,10 @@ macro(construct_compiler_rt_default_triple)
message(FATAL_ERROR "CMAKE_C_COMPILER_TARGET must also be set when COMPILER_RT_DEFAULT_TARGET_ONLY is ON")
endif()
message(STATUS "cmake c compiler target: ${CMAKE_C_COMPILER_TARGET}")
- if ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
- execute_process(COMMAND ${CMAKE_C_COMPILER} --target=${CMAKE_C_COMPILER_TARGET} -print-effective-triple
- OUTPUT_VARIABLE COMPILER_RT_DEFAULT_TARGET_TRIPLE
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- else()
- set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${CMAKE_C_COMPILER_TARGET})
- endif()
+ set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${CMAKE_C_COMPILER_TARGET})
else()
- if ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
- execute_process(COMMAND ${CMAKE_C_COMPILER} --target=${LLVM_TARGET_TRIPLE} -print-effective-triple
- OUTPUT_VARIABLE COMPILER_RT_DEFAULT_TARGET_TRIPLE
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- else()
- set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} CACHE STRING
- "Default triple for which compiler-rt runtimes will be built.")
- endif()
+ set(COMPILER_RT_DEFAULT_TARGET_TRIPLE ${LLVM_TARGET_TRIPLE} CACHE STRING
+ "Default triple for which compiler-rt runtimes will be built.")
endif()
string(REPLACE "-" ";" LLVM_TARGET_TRIPLE_LIST ${COMPILER_RT_DEFAULT_TARGET_TRIPLE})
More information about the llvm-commits
mailing list