Skip to content

Commit

Permalink
meson: Replace softmmu_ss -> system_ss
Browse files Browse the repository at this point in the history
We use the user_ss[] array to hold the user emulation sources,
and the softmmu_ss[] array to hold the system emulation ones.
Hold the latter in the 'system_ss[]' array for parity with user
emulation.

Mechanical change doing:

  $ sed -i -e s/softmmu_ss/system_ss/g $(git grep -l softmmu_ss)

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
  • Loading branch information
philmd authored and rth7680 committed Jun 20, 2023
1 parent c7b6494 commit de6cd75
Show file tree
Hide file tree
Showing 101 changed files with 714 additions and 714 deletions.
4 changes: 2 additions & 2 deletions accel/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
specific_ss.add(files('accel-common.c', 'accel-blocker.c'))
softmmu_ss.add(files('accel-softmmu.c'))
system_ss.add(files('accel-softmmu.c'))
user_ss.add(files('accel-user.c'))

subdir('tcg')
Expand All @@ -12,4 +12,4 @@ if have_system
endif

# qtest
softmmu_ss.add(files('dummy-cpus.c'))
system_ss.add(files('dummy-cpus.c'))
8 changes: 4 additions & 4 deletions audio/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
softmmu_ss.add([spice_headers, files('audio.c')])
softmmu_ss.add(files(
system_ss.add([spice_headers, files('audio.c')])
system_ss.add(files(
'audio-hmp-cmds.c',
'audio_legacy.c',
'mixeng.c',
Expand All @@ -8,8 +8,8 @@ softmmu_ss.add(files(
'wavcapture.c',
))

softmmu_ss.add(when: coreaudio, if_true: files('coreaudio.m'))
softmmu_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int.c'))
system_ss.add(when: coreaudio, if_true: files('coreaudio.m'))
system_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int.c'))

audio_modules = {}
foreach m : [
Expand Down
20 changes: 10 additions & 10 deletions backends/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
softmmu_ss.add([files(
system_ss.add([files(
'cryptodev-builtin.c',
'cryptodev-hmp-cmds.c',
'cryptodev.c',
Expand All @@ -10,20 +10,20 @@ softmmu_ss.add([files(
'confidential-guest-support.c',
), numa])

softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
system_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
system_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
system_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
if keyutils.found()
softmmu_ss.add(keyutils, files('cryptodev-lkcf.c'))
system_ss.add(keyutils, files('cryptodev-lkcf.c'))
endif
if have_vhost_user
softmmu_ss.add(when: 'CONFIG_VIRTIO', if_true: files('vhost-user.c'))
system_ss.add(when: 'CONFIG_VIRTIO', if_true: files('vhost-user.c'))
endif
softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c'))
system_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c'))
if have_vhost_user_crypto
softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost-user.c'))
system_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost-user.c'))
endif
softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c'))
softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c'))
system_ss.add(when: gio, if_true: files('dbus-vmstate.c'))
system_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c'))

subdir('tpm')
8 changes: 4 additions & 4 deletions backends/tpm/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if have_tpm
softmmu_ss.add(files('tpm_backend.c'))
softmmu_ss.add(files('tpm_util.c'))
softmmu_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c'))
softmmu_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
system_ss.add(files('tpm_backend.c'))
system_ss.add(files('tpm_util.c'))
system_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c'))
system_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
endif
6 changes: 3 additions & 3 deletions block/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ block_ss.add(files(
'write-threshold.c',
), zstd, zlib, gnutls)

softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
softmmu_ss.add(files('block-ram-registrar.c'))
system_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c'))
system_ss.add(files('block-ram-registrar.c'))

if get_option('qcow1').allowed()
block_ss.add(files('qcow.c'))
Expand Down Expand Up @@ -159,7 +159,7 @@ block_ss.add(block_gen_c)

block_ss.add(files('stream.c'))

softmmu_ss.add(files('qapi-sysemu.c'))
system_ss.add(files('qapi-sysemu.c'))

subdir('export')
subdir('monitor')
Expand Down
2 changes: 1 addition & 1 deletion block/monitor/meson.build
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
softmmu_ss.add(files('block-hmp-cmds.c'))
system_ss.add(files('block-hmp-cmds.c'))
block_ss.add(files('bitmap-qmp-cmds.c'))
2 changes: 1 addition & 1 deletion chardev/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ chardev_ss.add(when: 'CONFIG_WIN32', if_true: files(

chardev_ss = chardev_ss.apply(config_host, strict: false)

softmmu_ss.add(files(
system_ss.add(files(
'char-hmp-cmds.c',
'msmouse.c',
'wctablet.c',
Expand Down
2 changes: 1 addition & 1 deletion disas/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa.c'))
common_ss.add(when: capstone, if_true: [files('capstone.c'), capstone])
common_ss.add(files('disas.c'))

softmmu_ss.add(files('disas-mon.c'))
system_ss.add(files('disas-mon.c'))
specific_ss.add(capstone)
14 changes: 7 additions & 7 deletions docs/devel/build-system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ Target-independent emulator sourcesets:
This includes error handling infrastructure, standard data structures,
platform portability wrapper functions, etc.

Target-independent code lives in the ``common_ss``, ``softmmu_ss`` and
Target-independent code lives in the ``common_ss``, ``system_ss`` and
``user_ss`` sourcesets. ``common_ss`` is linked into all emulators,
``softmmu_ss`` only in system emulators, ``user_ss`` only in user-mode
``system_ss`` only in system emulators, ``user_ss`` only in user-mode
emulators.

Target-independent sourcesets must exercise particular care when using
Expand All @@ -197,11 +197,11 @@ Target-independent emulator sourcesets:
symbol::

# Some targets have CONFIG_ACPI, some don't, so this is not enough
softmmu_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi.c'),
system_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi.c'),
if_false: files('acpi-stub.c'))

# This is required as well:
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c'))
system_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c'))

Target-dependent emulator sourcesets:
In the target-dependent set lives CPU emulation, some device emulation and
Expand Down Expand Up @@ -229,16 +229,16 @@ Target-dependent emulator sourcesets:
for all emulators and for system emulators only. For example::

arm_ss = ss.source_set()
arm_softmmu_ss = ss.source_set()
arm_system_ss = ss.source_set()
...
target_arch += {'arm': arm_ss}
target_softmmu_arch += {'arm': arm_softmmu_ss}
target_softmmu_arch += {'arm': arm_system_ss}

Module sourcesets:
There are two dictionaries for modules: ``modules`` is used for
target-independent modules and ``target_modules`` is used for
target-dependent modules. When modules are disabled the ``module``
source sets are added to ``softmmu_ss`` and the ``target_modules``
source sets are added to ``system_ss`` and the ``target_modules``
source sets are added to ``specific_ss``.

Both dictionaries are nested. One dictionary is created per
Expand Down
2 changes: 1 addition & 1 deletion dump/meson.build
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
softmmu_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo])
system_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo])
specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: files('win_dump.c'))
2 changes: 1 addition & 1 deletion ebpf/meson.build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
softmmu_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
system_ss.add(when: libbpf, if_true: files('ebpf_rss.c'), if_false: files('ebpf_rss-stub.c'))
4 changes: 2 additions & 2 deletions fsdev/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
'9p-marshal.c',
'qemu-fsdev.c',
), if_false: files('qemu-fsdev-dummy.c'))
softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
softmmu_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)
system_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
system_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)

if have_virtfs_proxy_helper
executable('virtfs-proxy-helper',
Expand Down
10 changes: 5 additions & 5 deletions gdbstub/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
# cflags so:

gdb_user_ss = ss.source_set()
gdb_softmmu_ss = ss.source_set()
gdb_system_ss = ss.source_set()

# We build two versions of gdbstub, one for each mode
gdb_user_ss.add(files('gdbstub.c', 'user.c'))
gdb_softmmu_ss.add(files('gdbstub.c', 'softmmu.c'))
gdb_system_ss.add(files('gdbstub.c', 'softmmu.c'))

gdb_user_ss = gdb_user_ss.apply(config_host, strict: false)
gdb_softmmu_ss = gdb_softmmu_ss.apply(config_host, strict: false)
gdb_system_ss = gdb_system_ss.apply(config_host, strict: false)

libgdb_user = static_library('gdb_user',
gdb_user_ss.sources() + genh,
Expand All @@ -24,14 +24,14 @@ libgdb_user = static_library('gdb_user',
build_by_default: have_user)

libgdb_softmmu = static_library('gdb_softmmu',
gdb_softmmu_ss.sources() + genh,
gdb_system_ss.sources() + genh,
name_suffix: 'fa',
build_by_default: have_system)

gdb_user = declare_dependency(link_whole: libgdb_user)
user_ss.add(gdb_user)
gdb_softmmu = declare_dependency(link_whole: libgdb_softmmu)
softmmu_ss.add(gdb_softmmu)
system_ss.add(gdb_softmmu)

common_ss.add(files('syscalls.c'))

Expand Down
2 changes: 1 addition & 1 deletion hw/9pfs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ fs_ss.add(files(
fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c'))
fs_ss.add(when: 'CONFIG_DARWIN', if_true: files('9p-util-darwin.c'))
fs_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-9p-backend.c'))
softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
system_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)

specific_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device.c'))
10 changes: 5 additions & 5 deletions hw/acpi/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
if have_tpm
acpi_ss.add(files('tpm.c'))
endif
softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
softmmu_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c',
system_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c', 'ghes-stub.c', 'acpi_interface.c'))
system_ss.add(when: 'CONFIG_ACPI_PCI_BRIDGE', if_false: files('pci-bridge-stub.c'))
system_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
system_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c',
'acpi-x86-stub.c', 'ipmi-stub.c', 'ghes-stub.c',
'acpi-mem-hotplug-stub.c', 'acpi-cpu-hotplug-stub.c',
'acpi-pci-hotplug-stub.c', 'acpi-nvdimm-stub.c',
'cxl-stub.c', 'pci-bridge-stub.c'))
softmmu_ss.add(files('acpi-qmp-cmds.c'))
system_ss.add(files('acpi-qmp-cmds.c'))
10 changes: 5 additions & 5 deletions hw/adc/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
softmmu_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c'))
softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_adc.c'))
softmmu_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_adc.c'))
softmmu_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq-xadc.c'))
softmmu_ss.add(when: 'CONFIG_MAX111X', if_true: files('max111x.c'))
system_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c'))
system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_adc.c'))
system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_adc.c'))
system_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq-xadc.c'))
system_ss.add(when: 'CONFIG_MAX111X', if_true: files('max111x.c'))
8 changes: 4 additions & 4 deletions hw/arm/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ arm_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c'))
arm_ss.add(when: 'CONFIG_XEN', if_true: files('xen_arm.c'))
arm_ss.add_all(xen_ss)

softmmu_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c'))
softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c'))
softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c'))
softmmu_ss.add(when: 'CONFIG_TOSA', if_true: files('tosa.c'))
system_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c'))
system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c'))
system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c'))
system_ss.add(when: 'CONFIG_TOSA', if_true: files('tosa.c'))

hw_arch += {'arm': arm_ss}
28 changes: 14 additions & 14 deletions hw/audio/meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
softmmu_ss.add(files('soundhw.c'))
softmmu_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c'))
softmmu_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c'))
softmmu_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c'))
softmmu_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c'))
softmmu_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c'))
softmmu_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c'))
softmmu_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c'))
softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c'))
softmmu_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c'))
softmmu_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c'))
softmmu_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('via-ac97.c'))
softmmu_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c'))
system_ss.add(files('soundhw.c'))
system_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c'))
system_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c'))
system_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c'))
system_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c'))
system_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c'))
system_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c'))
system_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c'))
system_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c'))
system_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c'))
system_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c'))
system_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
system_ss.add(when: 'CONFIG_VT82C686', if_true: files('via-ac97.c'))
system_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c'))
28 changes: 14 additions & 14 deletions hw/block/meson.build
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
softmmu_ss.add(files(
system_ss.add(files(
'block.c',
'cdrom.c',
'hd-geometry.c'
))
softmmu_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c'))
softmmu_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'))
softmmu_ss.add(when: 'CONFIG_FDC_ISA', if_true: files('fdc-isa.c'))
softmmu_ss.add(when: 'CONFIG_FDC_SYSBUS', if_true: files('fdc-sysbus.c'))
softmmu_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c'))
softmmu_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c'))
softmmu_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c'))
softmmu_ss.add(when: 'CONFIG_PFLASH_CFI02', if_true: files('pflash_cfi02.c'))
softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c'))
softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80_sfdp.c'))
softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
softmmu_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c'))
softmmu_ss.add(when: 'CONFIG_TC58128', if_true: files('tc58128.c'))
system_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c'))
system_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'))
system_ss.add(when: 'CONFIG_FDC_ISA', if_true: files('fdc-isa.c'))
system_ss.add(when: 'CONFIG_FDC_SYSBUS', if_true: files('fdc-sysbus.c'))
system_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c'))
system_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c'))
system_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c'))
system_ss.add(when: 'CONFIG_PFLASH_CFI02', if_true: files('pflash_cfi02.c'))
system_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c'))
system_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80_sfdp.c'))
system_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
system_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-block.c'))
system_ss.add(when: 'CONFIG_TC58128', if_true: files('tc58128.c'))

specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c', 'virtio-blk-common.c'))
specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c', 'virtio-blk-common.c'))
Expand Down
Loading

0 comments on commit de6cd75

Please sign in to comment.