[llvm-branch-commits] [compiler-rt] f12c81f - Revert "CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE (#88407)"

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Apr 14 09:10:25 PDT 2024


Author: YunQiang Su
Date: 2024-04-15T00:10:22+08:00
New Revision: f12c81f2be59da892f7c54fb58cd9b0571bb438c

URL: https://github.com/llvm/llvm-project/commit/f12c81f2be59da892f7c54fb58cd9b0571bb438c
DIFF: https://github.com/llvm/llvm-project/commit/f12c81f2be59da892f7c54fb58cd9b0571bb438c.diff

LOG: Revert "CompilerRT: Normalize COMPILER_RT_DEFAULT_TARGET_TRIPLE (#88407)"

This reverts commit 00162162dd853795c532afa5dec4dc4e798d4a4b.

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-branch-commits mailing list