From c9322ab5bfe17e9db099646978f43a745816073e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sun, 18 Aug 2019 19:51:17 +0400 Subject: meson: cpu-emu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index df63f15..5b1608d 100644 --- a/meson.build +++ b/meson.build @@ -345,6 +345,16 @@ if 'CONFIG_USB_LIBUSB' in config_host libusb = declare_dependency(compile_args: config_host['LIBUSB_CFLAGS'].split(), link_args: config_host['LIBUSB_LIBS'].split()) endif +capstone = not_found +if 'CONFIG_CAPSTONE' in config_host + capstone = declare_dependency(compile_args: config_host['CAPSTONE_CFLAGS'].split(), + link_args: config_host['CAPSTONE_LIBS'].split()) +endif +libpmem = not_found +if 'CONFIG_LIBPMEM' in config_host + libpmem = declare_dependency(compile_args: config_host['LIBPMEM_CFLAGS'].split(), + link_args: config_host['LIBPMEM_LIBS'].split()) +endif create_config = find_program('scripts/create_config') minikconf = find_program('scripts/minikconf.py') @@ -529,6 +539,8 @@ target_softmmu_arch = {} # Trace files # ############### +# TODO: add each directory to the subdirs from its own meson.build, once +# we have those trace_events_subdirs = [ 'accel/kvm', 'accel/tcg', @@ -697,6 +709,20 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt], if_true: [files('device_tree.c')]) common_ss.add(files('cpus-common.c')) subdir('softmmu') + +specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem) +specific_ss.add(files('exec-vary.c')) +specific_ss.add(when: 'CONFIG_TCG', if_true: files( + 'fpu/softfloat.c', + 'tcg/optimize.c', + 'tcg/tcg-common.c', + 'tcg/tcg-op-gvec.c', + 'tcg/tcg-op-vec.c', + 'tcg/tcg-op.c', + 'tcg/tcg.c', +)) +specific_ss.add(when: 'CONFIG_TCG_INTERPRETER', if_true: files('disas/tci.c', 'tcg/tci.c')) + subdir('backends') subdir('disas') subdir('migration') @@ -788,6 +814,8 @@ common_all = static_library('common', dependencies: common_all.dependencies(), name_suffix: 'fa') +feature_to_c = find_program('scripts/feature_to_c.sh') + foreach target : target_dirs config_target = config_target_mak[target] target_name = config_target['TARGET_NAME'] @@ -834,6 +862,15 @@ foreach target : target_dirs endif endif + if 'TARGET_XML_FILES' in config_target + gdbstub_xml = custom_target(target + '-gdbstub-xml.c', + output: target + '-gdbstub-xml.c', + input: files(config_target['TARGET_XML_FILES'].split()), + command: [feature_to_c, '@INPUT@'], + capture: true) + arch_srcs += gdbstub_xml + endif + t = target_arch[arch].apply(config_target, strict: false) arch_srcs += t.sources() -- cgit v1.1