[compiler-rt] 5779966 - Revert "Revert "[compiler-rt] Fix check for cross-compiling""

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 19 07:01:01 PDT 2022


Author: Ellis Hoag
Date: 2022-08-19T07:00:51-07:00
New Revision: 5779966da82b8217ad66da890718755226fd32e7

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

LOG: Revert "Revert "[compiler-rt] Fix check for cross-compiling""

This reverts commit 18f6b05e0a5a4197bac787f5522669576c134869.

This is a reland of https://reviews.llvm.org/D132130 which I incorrectly
thought had broken the builds.

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

Added: 
    

Modified: 
    compiler-rt/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 2fdfa67646fba..ac737720eb682 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -127,11 +127,11 @@ set(COMPILER_RT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
 
 pythonize_bool(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
 
-# We support running instrumented tests when we're not cross compiling
+# We support running instrumented tests when we're not cross-compiling
 # and target a UNIX-like system or Windows.
 # We can run tests on Android even when we are cross-compiling.
-if(("${CMAKE_HOST_SYSTEM}" STREQUAL "${CMAKE_SYSTEM}" AND (UNIX OR WIN32)) OR ANDROID
-   OR COMPILER_RT_EMULATOR)
+if(("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "${CMAKE_SYSTEM_NAME}" AND (UNIX OR WIN32))
+   OR ANDROID OR COMPILER_RT_EMULATOR)
   option(COMPILER_RT_CAN_EXECUTE_TESTS "Can we execute instrumented tests" ON)
 else()
   option(COMPILER_RT_CAN_EXECUTE_TESTS "Can we execute instrumented tests" OFF)


        


More information about the llvm-commits mailing list