Skip to content

Commit

Permalink
Use correct host/target CMake variables to define lit variables.
Browse files Browse the repository at this point in the history
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175179 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Tim Northover authored and Tim Northover committed Feb 14, 2013
1 parent ad1b9dc commit 6872de9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6872de9

Please sign in to comment.