1
0
mirror of https://github.com/odrling/Aegisub synced 2025-04-11 22:56:02 +02:00

meson: luajit: Set correct LUAJIT_TARGET for buildvm

On native builds this is derived automatically, but on cross builds
it needs to be set explicitly.
This commit is contained in:
arch1t3cht 2023-11-06 22:44:18 +01:00 committed by Ryan Lucia
parent 3852dc0739
commit 44b5fc3889

View File

@ -7,6 +7,10 @@ system_deps = [
cc.find_library('m', required: false)
]
# get architecture id for the host machine so it can be set when compiling buildvm natively
lj_target_id = cc.get_define('LUAJIT_TARGET', prefix: '#include "@0@/src/lj_arch.h"'.format(meson.current_source_dir()))
add_project_arguments('-DLUAJIT_TARGET=@0@'.format(lj_target_id), language: 'c', native: true)
# compat flag is needed for both the buildvm code generator (compiled natively) and luajit itself
add_project_arguments('-DLUAJIT_ENABLE_LUA52COMPAT', '-DENDIAN_LE', language: 'c', native: true)
add_project_arguments('-DLUAJIT_ENABLE_LUA52COMPAT', '-DENDIAN_LE', language: 'c', native: false)