[llvm] r335961 - [cmake] Change WIN32 test to CMAKE_HOST_WIN32

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 29 03:34:37 PDT 2018


Author: filcab
Date: Fri Jun 29 03:34:37 2018
New Revision: 335961

URL: http://llvm.org/viewvc/llvm-project?rev=335961&view=rev
Log:
[cmake] Change WIN32 test to CMAKE_HOST_WIN32

The test is about what can be run on the host, not the cmake target.
When cross-compiling (compiler-rt at least) on Windows, we end up with
lit being unable to run llvm-lit because it can't find the llvm-lit
module.

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=335961&r1=335960&r2=335961&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Fri Jun 29 03:34:37 2018
@@ -1283,7 +1283,7 @@ function(get_llvm_lit_path base_dir file
   endif()
 
   set(lit_file_name "llvm-lit")
-  if (WIN32 AND NOT CYGWIN)
+  if (CMAKE_HOST_WIN32 AND NOT CYGWIN)
     # llvm-lit needs suffix.py for multiprocess to find a main module.
     set(lit_file_name "${lit_file_name}.py")
   endif ()




More information about the llvm-commits mailing list