meson: fix luajit compiler args

This commit is contained in:
Ryan Lucia 2019-02-17 12:22:30 -05:00 committed by odrling
parent 8f5e5bb588
commit 4c61dfcf51
2 changed files with 8 additions and 11 deletions

View File

@ -7,25 +7,22 @@ system_deps = [
cc.find_library('m', required: false)
]
system_deps_native = [
cc.find_library('dl', required: false, native: true),
cc.find_library('m', required: false, native: true)
]
add_project_arguments('-DLUAJIT_ENABLE_LUA52COMPAT', language: 'c')
if host_machine.system() == 'linux'
add_project_arguments('-DLUAJIT_USE_LINUX', language: 'c')
add_project_arguments('-DLUAJIT_OS=LUAJIT_OS_LINUX', language: 'c')
readline_dep = cc.find_library('readline')
ljvm_mode = 'elfasm'
ljvm_bout = 'lj_vm.s'
elif host_machine.system() == 'darwin'
add_project_arguments(['-DLUAJIT_USE_MACOSX'], language: 'c')
add_project_arguments(['-DLUAJIT_OS=LUAJIT_OS_OSX'], language: 'c')
readline_dep = cc.find_library('readline')
ljvm_mode = 'machasm'
ljvm_bout = 'lj_vm.s'
elif host_machine.system() == 'windows'
add_project_arguments('-DLUAJIT_USE_WINDOWS', '-DWIN',
'-malign-double', language: 'c')
add_project_arguments('-DLUAJIT_OS=LUAJIT_OS_WINDOWS', language: 'c')
if cc.get_id() != 'msvc'
add_project_arguments('-malign-double', language: 'c')
endif
readline_dep = []
ljvm_mode = 'peobj'
ljvm_bout = 'lj_vm.o'

View File

@ -1,5 +1,5 @@
minilua = executable('minilua', 'minilua.c',
dependencies: system_deps_native,
dependencies: system_deps,
native: true)
if host_machine.cpu_family() == 'x86_64'
@ -45,6 +45,6 @@ buildvm_arch = custom_target('buildvm_arch.h',
output: 'buildvm_arch.h')
buildvm = executable('buildvm', buildvm_src, buildvm_arch,
dependencies: system_deps_native,
dependencies: system_deps,
include_directories: src_inc,
native: true)