Skip to content

Commit

Permalink
Enabling ARM64 Windows build is only for ARM64 Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Jul 5, 2024
1 parent 0003553 commit e0def59
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions LuaJIT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,12 @@ if(WIN32 OR MINGW)
set(DASM_FLAGS ${DASM_FLAGS} -D WIN)
endif()

set(CROSSCOMPILING_MSVC 0)
set(ARM64_MSVC 0)
if (MSVC)
if ("${LJ_DETECTED_ARCH}" STREQUAL "AArch64")
set(CROSSCOMPILING_MSVC 1)
message(STATUS "Cross compiling with MSVC: ${CROSSCOMPILING_MSVC}")
else()
message(STATUS "Cross compiling with MSVC: ${CROSSCOMPILING_MSVC}")
if ("${LJ_DETECTED_ARCH}" STREQUAL "AArch64" AND
"${MAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL ARM64)
set(ARM64_MSVC 1)
message(STATUS "Compiling for ARM64 with MSVC: ${ARM64_MSVC}")
endif()
endif()

Expand Down Expand Up @@ -389,7 +388,7 @@ endif()
set(VM_DASC_PATH ${LJ_DIR}/vm_${DASM_ARCH}.dasc)

# Build the minilua for host platform
if(NOT CMAKE_CROSSCOMPILING OR CROSSCOMPILING_MSVC)
if(NOT CMAKE_CROSSCOMPILING OR ARM64_MSVC)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/host/minilua)
set(MINILUA_PATH $<TARGET_FILE:minilua>)
else()
Expand Down Expand Up @@ -453,7 +452,7 @@ if(HOST_WINE)
set(BUILDVM_EXE buildvm.exe)
endif()

if(NOT CMAKE_CROSSCOMPILING OR CROSSCOMPILING_MSVC)
if(NOT CMAKE_CROSSCOMPILING OR ARM64_MSVC)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/host/buildvm)
set(BUILDVM_PATH $<TARGET_FILE:buildvm>)
add_dependencies(buildvm buildvm_arch_h)
Expand Down

0 comments on commit e0def59

Please sign in to comment.