Skip to content

Commit 4d1a525

Browse files
committed
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Meson conversions + introspection-based command line parser # gpg: Signature made Thu 14 Oct 2021 12:51:54 AM PDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "[email protected]" # gpg: Good signature from "Paolo Bonzini <[email protected]>" [full] # gpg: aka "Paolo Bonzini <[email protected]>" [full] * remotes/bonzini/tags/for-upstream: (26 commits) configure: automatically parse command line for meson -D options meson-buildoptions: include list of tracing backends configure: prepare for auto-generated option parsing configure: accept "internal" for --enable-capstone/slirp/fdt configure: remove deprecated --{enable, disable}-git-update configure, meson: move more compiler checks to Meson configure: remove obsolete Solaris ar check configure, meson: move Spice configure handling to meson configure, meson: move netmap detection to meson configure, meson: move vde detection to meson configure, meson: move libaio check to meson.build configure, meson: move pthread_setname_np checks to Meson configure, meson: move remaining HAVE_* compiler tests to Meson meson: HAVE_GDB_BIN is not used by C code configure, meson: remove CONFIG_GCOV from config-host.mak configure, meson: get HOST_WORDS_BIGENDIAN via the machine object configure, meson: move CONFIG_HOST_DSOSUF to Meson trace: move configuration from configure to Meson trace: simple: pass trace_file unmodified to config-host.h configure, meson: move fuzzing configuration to Meson ... Signed-off-by: Richard Henderson <[email protected]>
2 parents e5b2333 + 3b4da13 commit 4d1a525

23 files changed

+1041
-1365
lines changed

Kconfig.host

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ config PVRDMA
4141
config MULTIPROCESS_ALLOWED
4242
bool
4343
imply MULTIPROCESS
44+
45+
config FUZZ
46+
bool
47+
select SPARSE_MEM

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ x := $(shell rm -rf meson-private meson-info meson-logs)
8787
endif
8888

8989
# 1. ensure config-host.mak is up-to-date
90-
config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
90+
config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildoptions.sh $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
9191
@echo config-host.mak is out-of-date, running configure
9292
@if test -f meson-private/coredata.dat; then \
9393
./config.status --skip-meson; \
@@ -124,6 +124,12 @@ ifneq ($(MESON),)
124124
Makefile.mtest: build.ninja scripts/mtest2make.py
125125
$(MESON) introspect --targets --tests --benchmarks | $(PYTHON) scripts/mtest2make.py > $@
126126
-include Makefile.mtest
127+
128+
.PHONY: update-buildoptions
129+
all update-buildoptions: $(SRC_PATH)/scripts/meson-buildoptions.sh
130+
$(SRC_PATH)/scripts/meson-buildoptions.sh: $(SRC_PATH)/meson_options.txt
131+
$(MESON) introspect --buildoptions $(SRC_PATH)/meson.build | $(PYTHON) \
132+
scripts/meson-buildoptions.py > $@.tmp && mv $@.tmp $@
127133
endif
128134

129135
# 4. Rules to bridge to other makefiles

audio/meson.build

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,22 @@ softmmu_ss.add(files(
77
'wavcapture.c',
88
))
99

10-
softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files('coreaudio.c'))
11-
softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], if_true: files('dsoundaudio.c'))
12-
softmmu_ss.add(when: ['CONFIG_AUDIO_WIN_INT'], if_true: files('audio_win_int.c'))
10+
softmmu_ss.add(when: coreaudio, if_true: files('coreaudio.c'))
11+
softmmu_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int.c'))
1312

1413
audio_modules = {}
1514
foreach m : [
16-
['CONFIG_AUDIO_ALSA', 'alsa', alsa, 'alsaaudio.c'],
17-
['CONFIG_AUDIO_OSS', 'oss', oss, 'ossaudio.c'],
18-
['CONFIG_AUDIO_PA', 'pa', pulse, 'paaudio.c'],
19-
['CONFIG_AUDIO_SDL', 'sdl', sdl, 'sdlaudio.c'],
20-
['CONFIG_AUDIO_JACK', 'jack', jack, 'jackaudio.c'],
21-
['CONFIG_SPICE', 'spice', spice, 'spiceaudio.c']
15+
['alsa', alsa, files('alsaaudio.c')],
16+
['oss', oss, files('ossaudio.c')],
17+
['pa', pulse, files('paaudio.c')],
18+
['sdl', sdl, files('sdlaudio.c')],
19+
['jack', jack, files('jackaudio.c')],
20+
['spice', spice, files('spiceaudio.c')]
2221
]
23-
if config_host.has_key(m[0])
22+
if m[1].found()
2423
module_ss = ss.source_set()
25-
module_ss.add(when: m[2], if_true: files(m[3]))
26-
audio_modules += {m[1] : module_ss}
24+
module_ss.add(m[1], m[2])
25+
audio_modules += {m[0] : module_ss}
2726
endif
2827
endforeach
2928

block/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, iokit
6565
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
6666
block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
6767
block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
68-
block_ss.add(when: ['CONFIG_LINUX_AIO', libaio], if_true: files('linux-aio.c'))
68+
block_ss.add(when: libaio, if_true: files('linux-aio.c'))
6969
block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
7070

7171
block_modules = {}

chardev/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if brlapi.found()
3535
chardev_modules += { 'baum': module_ss }
3636
endif
3737

38-
if config_host.has_key('CONFIG_SPICE')
38+
if spice.found()
3939
module_ss = ss.source_set()
4040
module_ss.add(when: [spice], if_true: files('spice.c'))
4141
chardev_modules += { 'spice': module_ss }

0 commit comments

Comments
 (0)