set arch tuple in meson (#1254)

the existing preprocessor logic in C is kept for alternative compilation methods
This commit is contained in:
Jan 2022-12-22 16:24:13 +01:00 committed by GitHub
parent 0ab7fe9311
commit 5c4d15c4d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -53,8 +53,12 @@ if get_option('renderer') or host_machine.system() == 'darwin'
lite_cargs += '-DLITE_USE_SDL_RENDERER'
endif
if get_option('arch_tuple') != ''
lite_cargs += '-DLITE_ARCH_TUPLE="@0@"'.format(get_option('arch_tuple'))
arch_tuple = get_option('arch_tuple')
else
arch_tuple = '@0@-@1@'.format(target_machine.cpu_family(), target_machine.system())
endif
lite_cargs += '-DLITE_ARCH_TUPLE="@0@"'.format(arch_tuple)
#===============================================================================
# Linker Settings
#===============================================================================