aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build17
1 files changed, 15 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index ad4327888f..bae62efc9c 100644
--- a/meson.build
+++ b/meson.build
@@ -173,11 +173,13 @@ endif
qemu_cflags = config_host['QEMU_CFLAGS'].split()
qemu_cxxflags = config_host['QEMU_CXXFLAGS'].split()
+qemu_objcflags = config_host['QEMU_OBJCFLAGS'].split()
qemu_ldflags = config_host['QEMU_LDFLAGS'].split()
if get_option('gprof')
qemu_cflags += ['-p']
qemu_cxxflags += ['-p']
+ qemu_objcflags += ['-p']
qemu_ldflags += ['-p']
endif
@@ -216,8 +218,9 @@ if get_option('fuzzing')
endif
endif
-add_global_arguments(qemu_cflags, native: false, language: ['c', 'objc'])
+add_global_arguments(qemu_cflags, native: false, language: ['c'])
add_global_arguments(qemu_cxxflags, native: false, language: ['cpp'])
+add_global_arguments(qemu_objcflags, native: false, language: ['objc'])
add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cpp', 'objc'])
if targetos == 'linux'
@@ -3076,6 +3079,10 @@ common_all = static_library('common',
feature_to_c = find_program('scripts/feature_to_c.sh')
+if targetos == 'darwin'
+ entitlement = find_program('scripts/entitlement.sh')
+endif
+
emulators = {}
foreach target : target_dirs
config_target = config_target_mak[target]
@@ -3233,7 +3240,6 @@ foreach target : target_dirs
install_input += meson.current_source_dir() / entitlements
endif
- entitlement = find_program('scripts/entitlement.sh')
emulators += {exe['name'] : custom_target(exe['name'],
input: build_input,
output: exe['name'],
@@ -3470,11 +3476,18 @@ if link_language == 'cpp'
+ ['-O' + get_option('optimization')]
+ (get_option('debug') ? ['-g'] : []))}
endif
+if targetos == 'darwin'
+ summary_info += {'OBJCFLAGS': ' '.join(get_option('objc_args')
+ + ['-O' + get_option('optimization')]
+ + (get_option('debug') ? ['-g'] : []))}
+endif
link_args = get_option(link_language + '_link_args')
if link_args.length() > 0
summary_info += {'LDFLAGS': ' '.join(link_args)}
endif
summary_info += {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']}
+summary_info += {'QEMU_CXXFLAGS': config_host['QEMU_CXXFLAGS']}
+summary_info += {'QEMU_OBJCFLAGS': config_host['QEMU_OBJCFLAGS']}
summary_info += {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']}
summary_info += {'profiler': get_option('profiler')}
summary_info += {'link-time optimization (LTO)': get_option('b_lto')}