summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorPeter Maydell2020-10-12 23:48:45 +0200
committerPeter Maydell2020-10-12 23:48:45 +0200
commit724c1c8bb350d84c097ab2005aad15e125d06b6c (patch)
treeb55ff4dc3e8012e2624d2aa2d1211684bd425656 /meson.build
parentMerge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20201012a'... (diff)
parentmeson: identify more sections of meson.build (diff)
downloadqemu-724c1c8bb350d84c097ab2005aad15e125d06b6c.tar.gz
qemu-724c1c8bb350d84c097ab2005aad15e125d06b6c.tar.xz
qemu-724c1c8bb350d84c097ab2005aad15e125d06b6c.zip
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* qtest documentation improvements (Eduardo, myself) * libqtest event buffering (Maxim) * use RCU for list of children of a bus (Maxim) * move more files to softmmu/ (myself) * meson.build cleanups, qemu-storage-daemon fix (Philippe) # gpg: Signature made Mon 12 Oct 2020 16:55:19 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (38 commits) meson: identify more sections of meson.build scsi/scsi_bus: fix races in REPORT LUNS virtio-scsi: use scsi_device_get scsi/scsi_bus: Add scsi_device_get scsi/scsi-bus: scsi_device_find: don't return unrealized devices device-core: use atomic_set on .realized property scsi: switch to bus->check_address device-core: use RCU for list of children of a bus device_core: use drain_call_rcu in in qmp_device_add scsi/scsi_bus: switch search direction in scsi_device_find qdev: add "check if address free" callback for buses qemu-iotests, qtest: rewrite test 067 as a qtest qtest: check that drives are really appearing and disappearing qtest: switch users back to qtest_qmp_receive device-plug-test: use qtest_qmp to send the device_del command qtest: remove qtest_qmp_receive_success qtest: Reintroduce qtest_qmp_receive with QMP event buffering qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict meson.build: Re-enable KVM support for MIPS build-sys: fix git version from -version ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build126
1 files changed, 99 insertions, 27 deletions
diff --git a/meson.build b/meson.build
index 17c89c87c6..652c37cceb 100644
--- a/meson.build
+++ b/meson.build
@@ -59,6 +59,8 @@ elif cpu == 's390x'
kvm_targets = ['s390x-softmmu']
elif cpu in ['ppc', 'ppc64']
kvm_targets = ['ppc-softmmu', 'ppc64-softmmu']
+elif cpu in ['mips', 'mips64']
+ kvm_targets = ['mips-softmmu', 'mipsel-softmmu', 'mips64-softmmu', 'mips64el-softmmu']
else
kvm_targets = []
endif
@@ -612,7 +614,9 @@ if not has_malloc_trim and get_option('malloc_trim').enabled()
endif
endif
-# Create config-host.h
+#################
+# config-host.h #
+#################
config_host_data.set('CONFIG_COCOA', cocoa.found())
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
@@ -658,6 +662,10 @@ foreach k, v: config_host
endif
endforeach
+########################
+# Target configuration #
+########################
+
minikconf = find_program('scripts/minikconf.py')
config_all = {}
config_all_devices = {}
@@ -864,7 +872,9 @@ config_all += {
'CONFIG_ALL': true,
}
-# Submodules
+##############
+# Submodules #
+##############
capstone = not_found
capstone_opt = get_option('capstone')
@@ -1103,9 +1113,11 @@ config_host_data.set('CONFIG_CAPSTONE', capstone.found())
config_host_data.set('CONFIG_FDT', fdt.found())
config_host_data.set('CONFIG_SLIRP', slirp.found())
-genh += configure_file(output: 'config-host.h', configuration: config_host_data)
+#####################
+# Generated sources #
+#####################
-# Generators
+genh += configure_file(output: 'config-host.h', configuration: config_host_data)
hxtool = find_program('scripts/hxtool')
shaderinclude = find_program('scripts/shaderinclude.pl')
@@ -1180,21 +1192,28 @@ sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
meson.source_root() / 'docs/sphinx/qmp_lexer.py',
qapi_gen_depends ]
-# Collect sourcesets.
+###################
+# Collect sources #
+###################
-util_ss = ss.source_set()
-stub_ss = ss.source_set()
-trace_ss = ss.source_set()
-block_ss = ss.source_set()
+authz_ss = ss.source_set()
blockdev_ss = ss.source_set()
-qmp_ss = ss.source_set()
-common_ss = ss.source_set()
-softmmu_ss = ss.source_set()
-user_ss = ss.source_set()
+block_ss = ss.source_set()
bsd_user_ss = ss.source_set()
+chardev_ss = ss.source_set()
+common_ss = ss.source_set()
+crypto_ss = ss.source_set()
+io_ss = ss.source_set()
linux_user_ss = ss.source_set()
-specific_ss = ss.source_set()
+qmp_ss = ss.source_set()
+qom_ss = ss.source_set()
+softmmu_ss = ss.source_set()
specific_fuzz_ss = ss.source_set()
+specific_ss = ss.source_set()
+stub_ss = ss.source_set()
+trace_ss = ss.source_set()
+user_ss = ss.source_set()
+util_ss = ss.source_set()
modules = {}
hw_arch = {}
@@ -1313,8 +1332,6 @@ if enable_modules
modulecommon = declare_dependency(link_whole: libmodulecommon, compile_args: '-DBUILD_DSO')
endif
-# Build targets from sourcesets
-
stub_ss = stub_ss.apply(config_all, strict: false)
util_ss.add_all(trace_ss)
@@ -1360,24 +1377,14 @@ blockdev_ss.add(files(
# os-win32.c does not
blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
-
softmmu_ss.add_all(blockdev_ss)
-softmmu_ss.add(files(
- 'bootdevice.c',
- 'dma-helpers.c',
- 'qdev-monitor.c',
-), sdl)
-
-softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
-softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp])
-softmmu_ss.add(when: fdt, if_true: files('device_tree.c'))
common_ss.add(files('cpus-common.c'))
subdir('softmmu')
common_ss.add(capstone)
-specific_ss.add(files('disas.c', 'exec.c', 'gdbstub.c'), capstone, libpmem, libdaxctl)
+specific_ss.add(files('cpu.c', 'disas.c', 'gdbstub.c'), capstone)
specific_ss.add(files('exec-vary.c'))
specific_ss.add(when: 'CONFIG_TCG', if_true: files(
'fpu/softfloat.c',
@@ -1412,6 +1419,10 @@ specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss)
subdir('tests/qtest/libqos')
subdir('tests/qtest/fuzz')
+########################
+# Library dependencies #
+########################
+
block_mods = []
softmmu_mods = []
foreach d, list : modules
@@ -1446,6 +1457,47 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
capture: true,
command: [undefsym, nm, '@INPUT@'])
+qom_ss = qom_ss.apply(config_host, strict: false)
+libqom = static_library('qom', qom_ss.sources() + genh,
+ dependencies: [qom_ss.dependencies()],
+ name_suffix: 'fa')
+
+qom = declare_dependency(link_whole: libqom)
+
+authz_ss = authz_ss.apply(config_host, strict: false)
+libauthz = static_library('authz', authz_ss.sources() + genh,
+ dependencies: [authz_ss.dependencies()],
+ name_suffix: 'fa',
+ build_by_default: false)
+
+authz = declare_dependency(link_whole: libauthz,
+ dependencies: qom)
+
+crypto_ss = crypto_ss.apply(config_host, strict: false)
+libcrypto = static_library('crypto', crypto_ss.sources() + genh,
+ dependencies: [crypto_ss.dependencies()],
+ name_suffix: 'fa',
+ build_by_default: false)
+
+crypto = declare_dependency(link_whole: libcrypto,
+ dependencies: [authz, qom])
+
+io_ss = io_ss.apply(config_host, strict: false)
+libio = static_library('io', io_ss.sources() + genh,
+ dependencies: [io_ss.dependencies()],
+ link_with: libqemuutil,
+ name_suffix: 'fa',
+ build_by_default: false)
+
+io = declare_dependency(link_whole: libio, dependencies: [crypto, qom])
+
+libmigration = static_library('migration', sources: migration_files + genh,
+ name_suffix: 'fa',
+ build_by_default: false)
+migration = declare_dependency(link_with: libmigration,
+ dependencies: [zlib, qom, io])
+softmmu_ss.add(migration)
+
block_ss = block_ss.apply(config_host, strict: false)
libblock = static_library('block', block_ss.sources() + genh,
dependencies: block_ss.dependencies(),
@@ -1465,6 +1517,22 @@ libqmp = static_library('qmp', qmp_ss.sources() + genh,
qmp = declare_dependency(link_whole: [libqmp])
+libchardev = static_library('chardev', chardev_ss.sources() + genh,
+ name_suffix: 'fa',
+ build_by_default: false)
+
+chardev = declare_dependency(link_whole: libchardev)
+
+libhwcore = static_library('hwcore', sources: hwcore_files + genh,
+ name_suffix: 'fa',
+ build_by_default: false)
+hwcore = declare_dependency(link_whole: libhwcore)
+common_ss.add(hwcore)
+
+###########
+# Targets #
+###########
+
foreach m : block_mods + softmmu_mods
shared_module(m.name(),
name_prefix: '',
@@ -1739,6 +1807,10 @@ if host_machine.system() == 'windows'
alias_target('installer', nsis)
endif
+#########################
+# Configuration summary #
+#########################
+
summary_info = {}
summary_info += {'Install prefix': config_host['prefix']}
summary_info += {'BIOS directory': config_host['qemu_datadir']}