Skip to content

Commit

Permalink
add LJ_ENDIAN and LJ_NO_UNWIND checks
Browse files Browse the repository at this point in the history
  • Loading branch information
truemedian authored and zhaozg committed Oct 21, 2021
1 parent e8b8699 commit e425c39
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions deps/luajit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ SET(DASM_ARCH ${TARGET_LJARCH})
SET(DASM_FLAGS)
SET(TARGET_ARCH)
LIST(APPEND TARGET_ARCH "LUAJIT_TARGET=LUAJIT_ARCH_${TARGET_LJARCH}")
LJ_TEST_ARCH_VALUE(LJ_LE 1)
IF(LJ_LE_1)
SET(DASM_FLAGS ${DASM_FLAGS} -D ENDIAN_LE)
ELSE()
SET(DASM_FLAGS ${DASM_FLAGS} -D ENDIAN_BE)
ENDIF()
LJ_TEST_ARCH_VALUE(LJ_ARCH_BITS 64)
IF(LJ_ARCH_BITS_64)
SET(DASM_FLAGS ${DASM_FLAGS} -D P64)
Expand Down Expand Up @@ -182,6 +188,11 @@ IF(NOT LJ_ABI_SOFTFP_1)
ELSE()
LIST(APPEND TARGET_ARCH "LJ_ABI_SOFTFP=1")
ENDIF()
LJ_TEST_ARCH_VALUE(LJ_NO_UNWIND 1)
IF(LJ_NO_UNWIND_1)
SET(DASM_FLAGS ${DASM_FLAGS} -D NO_UNWIND)
LIST(APPEND TARGET_ARCH "LUAJIT_NO_UNWIND=1")
ENDIF()
IF(WIN32)
SET(DASM_FLAGS ${DASM_FLAGS} -LN -D WIN)
ENDIF()
Expand Down

0 comments on commit e425c39

Please sign in to comment.