Merge branch 'bugfixes' into feature

This commit is contained in:
arch1t3cht 2023-11-06 22:45:06 +01:00
commit 752a14cc25
2 changed files with 8 additions and 5 deletions

View File

@ -418,7 +418,10 @@ subdir('libaegisub')
subdir('packages')
subdir('po')
subdir('src')
subdir('tests')
if not meson.is_cross_build()
subdir('tests')
endif
aegisub_cpp_pch = ['src/include/agi_pre.h']
aegisub_c_pch = ['src/include/agi_pre_c.h']

View File

@ -7,19 +7,21 @@ 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)
if host_machine.system() == 'linux'
add_project_arguments('-DLUAJIT_OS=LUAJIT_OS_LINUX', language: 'c', native: true)
add_project_arguments('-DLUAJIT_UNWIND_EXTERNAL', language: 'c', native: false)
readline_dep = cc.find_library('readline')
ljvm_mode = 'elfasm'
ljvm_bout = 'lj_vm.s'
elif host_machine.system() == 'darwin'
add_project_arguments('-DLUAJIT_OS=LUAJIT_OS_OSX', language: 'c', native: true)
add_project_arguments('-DLUAJIT_UNWIND_EXTERNAL', language: 'c', native: false)
readline_dep = cc.find_library('readline')
ljvm_mode = 'machasm'
ljvm_bout = 'lj_vm.s'
elif host_machine.system() == 'windows'
@ -27,11 +29,9 @@ elif host_machine.system() == 'windows'
if cc.get_id() != 'msvc'
add_project_arguments('-malign-double', language: 'c', native: true)
endif
readline_dep = []
ljvm_mode = 'peobj'
ljvm_bout = 'lj_vm.o'
else
readline_dep = []
error('Unsupported platform')
endif