Merge pull request #28 from kraj/master

meson: Add option to pass cpu
pull/30/head
Ariadne Conill 2021-05-30 11:00:18 -05:00 committed by GitHub
commit 0108623531
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -6,7 +6,11 @@ project(
version : run_command('head', files('VERSION')).stdout() version : run_command('head', files('VERSION')).stdout()
) )
cpu = get_option('cpu')
if cpu == ''
cpu = host_machine.cpu_family() cpu = host_machine.cpu_family()
endif
if cpu == 'sh4' if cpu == 'sh4'
cpu = 'sh' cpu = 'sh'
endif endif

View File

@ -2,3 +2,5 @@ option('freestanding', type : 'boolean', value : false,
description: 'Do not use system headers') description: 'Do not use system headers')
option('export_unprefixed', type : 'boolean', value : true, option('export_unprefixed', type : 'boolean', value : true,
description: 'Export POSIX 2004 ucontext names as alises') description: 'Export POSIX 2004 ucontext names as alises')
option('cpu', type : 'string', value : '',
description: 'Target CPU architecture for cross compile')