Use correct host/target CMake variables to define lit variables.
authorTim Northover <Tim.Northover@arm.com>
Thu, 14 Feb 2013 16:49:32 +0000 (16:49 +0000)
committerTim Northover <Tim.Northover@arm.com>
Thu, 14 Feb 2013 16:49:32 +0000 (16:49 +0000)
CMake and autotools disagree on what "host" means in a cross-compilation
context. Autotools (and lit) take it to be the machine the binaries being
compiled now will run on. CMake takes it to be the machine actually compiling
the binaries now.

This change makes lit.site-cfg more consistent between autotools and CMake,
allowing lit tests (particularly in ExecutionEngine) to run correctly when
cross-compiled with CMake

llvm-svn: 175179

llvm/cmake/modules/AddLLVM.cmake

index bc7d0544e94d4a9550080b61bd19d4380d03e83a..f0b31ce6538566d8b2bf31d12925c901e118413e 100755 (executable)
@@ -246,8 +246,8 @@ function(configure_lit_site_cfg input output)
     set(ENABLE_ASSERTIONS "0")
   endif()
 
-  set(HOST_OS ${CMAKE_HOST_SYSTEM_NAME})
-  set(HOST_ARCH ${CMAKE_HOST_SYSTEM_PROCESSOR})
+  set(HOST_OS ${CMAKE_SYSTEM_NAME})
+  set(HOST_ARCH ${CMAKE_SYSTEM_PROCESSOR})
 
   configure_file(${input} ${output} @ONLY)
 endfunction()