-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add remaining dasm flags in luajit wrap
This now matches the makefile. Also stop hardcoding the flags for MSVC, since cc.get_define seems to work properly there now.
- Loading branch information
1 parent
6fffca2
commit 7f8815a
Showing
1 changed file
with
27 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,34 +10,37 @@ endif | |
dynasm_dasc = files('../vm_@[email protected]'.format(dynasm_arch)) | ||
dasm = [minilua, files('../../dynasm/dynasm.lua')] | ||
|
||
if cc.get_id() == 'msvc' | ||
# the cl.exe preprocessor seemingly removes/expands macros, so hardcode flags | ||
dasm += ['-D', 'WIN', '-D', 'JIT', '-D', 'FFI'] | ||
if host_machine.cpu_family() == 'x86_64' | ||
dasm += ['-D', 'P64'] | ||
endif | ||
else | ||
# BUG: meson does not resolve paths correctly for subprojects | ||
hpre = '#include "@0@/../lj_arch.h"'.format(meson.current_source_dir()) | ||
|
||
checkdefs = [ | ||
['LJ_LE', '1', ['-D', 'ENDIAN_LE']], | ||
['LJ_ARCH_BITS', '64', ['-D', 'P64']], | ||
['LJ_HASJIT', '1', ['-D', 'JIT']], | ||
['LJ_HASFFI', '1', ['-D', 'FFI']], | ||
] | ||
|
||
if host_machine.cpu_family() == 'x86' | ||
checkdefs += ['__SSE2__', '1', ['-D', 'SSE']] | ||
# BUG: meson does not resolve paths correctly for subprojects | ||
hpre = '#include "@0@/../lj_arch.h"'.format(meson.current_source_dir()) | ||
|
||
checkdefs = [ | ||
['LJ_LE', '1', ['-D', 'ENDIAN_LE']], | ||
['LJ_ARCH_BITS', '64', ['-D', 'P64']], | ||
['LJ_HASJIT', '1', ['-D', 'JIT']], | ||
['LJ_HASFFI', '1', ['-D', 'FFI']], | ||
['LJ_DUALNUM', '1', ['-D', 'DUALNUM']], | ||
['LJ_ARCH_HASFPU', '1', ['-D', 'FPU']], | ||
['LJ_ABI_SOFTFP', '0', ['-D', 'HFABI']], | ||
['LJ_NO_UNWIND', '1', ['-D', 'NO_UNWIND']], | ||
['LJ_ABI_PAUTH', '1', ['-D', 'PAUTH']], | ||
] | ||
|
||
if host_machine.cpu_family() == 'x86' | ||
checkdefs += ['__SSE2__', '1', ['-D', 'SSE']] | ||
endif | ||
|
||
foreach def: checkdefs | ||
if cc.get_define(def[0], prefix: hpre) == def[1] | ||
dasm += def[2] | ||
endif | ||
endforeach | ||
|
||
foreach def: checkdefs | ||
if cc.get_define(def[0], prefix: hpre) == def[1] | ||
dasm += def[2] | ||
endif | ||
endforeach | ||
if host_machine.system() == 'windows' | ||
dasm += ['-D', 'WIN'] | ||
endif | ||
|
||
dasm += ['-D', 'VER=' + cc.get_define('LJ_ARCH_VERSION', prefix: hpre)] | ||
|
||
buildvm_src = files( | ||
'buildvm.c', | ||
'buildvm_asm.c', | ||
|