mirror of
https://github.com/qemu/qemu.git
synced 2025-01-21 13:03:26 +08:00
configure, meson: move --enable-plugins to meson
While the option still needs to be parsed in the configure script (it's needed by tests/tcg, and also to decide about recursing into contrib/plugins), passing it to Meson can be done with -D instead of using config-host.mak. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
2a5919ab64
commit
2c13c57441
@ -11,7 +11,9 @@ tcg_ss.add(files(
|
|||||||
))
|
))
|
||||||
tcg_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c'))
|
tcg_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c'))
|
||||||
tcg_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c'))
|
tcg_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c'))
|
||||||
tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: [files('plugin-gen.c')])
|
if get_option('plugins')
|
||||||
|
tcg_ss.add(files('plugin-gen.c'))
|
||||||
|
endif
|
||||||
tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
|
tcg_ss.add(when: libdw, if_true: files('debuginfo.c'))
|
||||||
tcg_ss.add(when: 'CONFIG_LINUX', if_true: files('perf.c'))
|
tcg_ss.add(when: 'CONFIG_LINUX', if_true: files('perf.c'))
|
||||||
specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
|
specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
|
||||||
|
5
configure
vendored
5
configure
vendored
@ -1712,10 +1712,6 @@ case $targetos in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test "$plugins" = "yes" ; then
|
|
||||||
echo "CONFIG_PLUGIN=y" >> $config_host_mak
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$gdb_bin"; then
|
if test -n "$gdb_bin"; then
|
||||||
gdb_version=$($gdb_bin --version | head -n 1)
|
gdb_version=$($gdb_bin --version | head -n 1)
|
||||||
if version_ge ${gdb_version##* } 9.1; then
|
if version_ge ${gdb_version##* } 9.1; then
|
||||||
@ -1909,6 +1905,7 @@ if test "$skip_meson" = no; then
|
|||||||
test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
|
test "$cfi" != false && meson_option_add "-Dcfi=$cfi"
|
||||||
test "$docs" != auto && meson_option_add "-Ddocs=$docs"
|
test "$docs" != auto && meson_option_add "-Ddocs=$docs"
|
||||||
test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
|
test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engine=$LIB_FUZZING_ENGINE"
|
||||||
|
test "$plugins" = yes && meson_option_add "-Dplugins=true"
|
||||||
test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix"
|
test "$qemu_suffix" != qemu && meson_option_add "-Dqemu_suffix=$qemu_suffix"
|
||||||
test "$smbd" != '' && meson_option_add "-Dsmbd=$smbd"
|
test "$smbd" != '' && meson_option_add "-Dsmbd=$smbd"
|
||||||
test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
|
test "$tcg" != enabled && meson_option_add "-Dtcg=$tcg"
|
||||||
|
@ -730,7 +730,7 @@ glib_cflags = []
|
|||||||
if enable_modules
|
if enable_modules
|
||||||
gmodule = dependency('gmodule-export-2.0', version: glib_req_ver, required: true,
|
gmodule = dependency('gmodule-export-2.0', version: glib_req_ver, required: true,
|
||||||
method: 'pkg-config')
|
method: 'pkg-config')
|
||||||
elif config_host.has_key('CONFIG_PLUGIN')
|
elif get_option('plugins')
|
||||||
gmodule = dependency('gmodule-no-export-2.0', version: glib_req_ver, required: true,
|
gmodule = dependency('gmodule-no-export-2.0', version: glib_req_ver, required: true,
|
||||||
method: 'pkg-config')
|
method: 'pkg-config')
|
||||||
else
|
else
|
||||||
@ -2115,6 +2115,7 @@ if numa.found()
|
|||||||
dependencies: numa))
|
dependencies: numa))
|
||||||
endif
|
endif
|
||||||
config_host_data.set('CONFIG_OPENGL', opengl.found())
|
config_host_data.set('CONFIG_OPENGL', opengl.found())
|
||||||
|
config_host_data.set('CONFIG_PLUGIN', get_option('plugins'))
|
||||||
config_host_data.set('CONFIG_RBD', rbd.found())
|
config_host_data.set('CONFIG_RBD', rbd.found())
|
||||||
config_host_data.set('CONFIG_RDMA', rdma.found())
|
config_host_data.set('CONFIG_RDMA', rdma.found())
|
||||||
config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack'))
|
config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack'))
|
||||||
@ -3883,7 +3884,7 @@ endforeach
|
|||||||
|
|
||||||
# Other build targets
|
# Other build targets
|
||||||
|
|
||||||
if 'CONFIG_PLUGIN' in config_host
|
if get_option('plugins')
|
||||||
install_headers('include/qemu/qemu-plugin.h')
|
install_headers('include/qemu/qemu-plugin.h')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -4156,7 +4157,7 @@ if config_all.has_key('CONFIG_TCG')
|
|||||||
else
|
else
|
||||||
summary_info += {'TCG backend': 'native (@0@)'.format(cpu)}
|
summary_info += {'TCG backend': 'native (@0@)'.format(cpu)}
|
||||||
endif
|
endif
|
||||||
summary_info += {'TCG plugins': config_host.has_key('CONFIG_PLUGIN')}
|
summary_info += {'TCG plugins': get_option('plugins')}
|
||||||
summary_info += {'TCG debug enabled': get_option('debug_tcg')}
|
summary_info += {'TCG debug enabled': get_option('debug_tcg')}
|
||||||
endif
|
endif
|
||||||
summary_info += {'target list': ' '.join(target_dirs)}
|
summary_info += {'target list': ' '.join(target_dirs)}
|
||||||
|
@ -83,6 +83,8 @@ option('xen_pci_passthrough', type: 'feature', value: 'auto',
|
|||||||
description: 'Xen PCI passthrough support')
|
description: 'Xen PCI passthrough support')
|
||||||
option('tcg', type: 'feature', value: 'enabled',
|
option('tcg', type: 'feature', value: 'enabled',
|
||||||
description: 'TCG support')
|
description: 'TCG support')
|
||||||
|
option('plugins', type: 'boolean', value: false,
|
||||||
|
description: 'TCG plugins via shared library loading')
|
||||||
option('debug_tcg', type: 'boolean', value: false,
|
option('debug_tcg', type: 'boolean', value: false,
|
||||||
description: 'TCG debugging')
|
description: 'TCG debugging')
|
||||||
option('tcg_interpreter', type: 'boolean', value: false,
|
option('tcg_interpreter', type: 'boolean', value: false,
|
||||||
|
@ -13,8 +13,10 @@ if not enable_modules
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files(
|
if get_option('plugins')
|
||||||
'loader.c',
|
specific_ss.add(files(
|
||||||
'core.c',
|
'loader.c',
|
||||||
'api.c',
|
'core.c',
|
||||||
), declare_dependency(link_args: plugin_ldflags)])
|
'api.c',
|
||||||
|
), declare_dependency(link_args: plugin_ldflags))
|
||||||
|
endif
|
||||||
|
@ -40,6 +40,7 @@ meson_options_help() {
|
|||||||
printf "%s\n" ' jemalloc/system/tcmalloc)'
|
printf "%s\n" ' jemalloc/system/tcmalloc)'
|
||||||
printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for'
|
printf "%s\n" ' --enable-module-upgrades try to load modules from alternate paths for'
|
||||||
printf "%s\n" ' upgrades'
|
printf "%s\n" ' upgrades'
|
||||||
|
printf "%s\n" ' --enable-plugins TCG plugins via shared library loading'
|
||||||
printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u)random and'
|
printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u)random and'
|
||||||
printf "%s\n" ' getrandom()'
|
printf "%s\n" ' getrandom()'
|
||||||
printf "%s\n" ' --enable-safe-stack SafeStack Stack Smash Protection (requires'
|
printf "%s\n" ' --enable-safe-stack SafeStack Stack Smash Protection (requires'
|
||||||
@ -401,6 +402,8 @@ _meson_option_parse() {
|
|||||||
--enable-pipewire) printf "%s" -Dpipewire=enabled ;;
|
--enable-pipewire) printf "%s" -Dpipewire=enabled ;;
|
||||||
--disable-pipewire) printf "%s" -Dpipewire=disabled ;;
|
--disable-pipewire) printf "%s" -Dpipewire=disabled ;;
|
||||||
--with-pkgversion=*) quote_sh "-Dpkgversion=$2" ;;
|
--with-pkgversion=*) quote_sh "-Dpkgversion=$2" ;;
|
||||||
|
--enable-plugins) printf "%s" -Dplugins=true ;;
|
||||||
|
--disable-plugins) printf "%s" -Dplugins=false ;;
|
||||||
--enable-png) printf "%s" -Dpng=enabled ;;
|
--enable-png) printf "%s" -Dpng=enabled ;;
|
||||||
--disable-png) printf "%s" -Dpng=disabled ;;
|
--disable-png) printf "%s" -Dpng=disabled ;;
|
||||||
--enable-pvrdma) printf "%s" -Dpvrdma=enabled ;;
|
--enable-pvrdma) printf "%s" -Dpvrdma=enabled ;;
|
||||||
|
@ -73,7 +73,7 @@ $(TCG_TESTS_TARGETS:%=distclean-tcg-tests-%): distclean-tcg-tests-%:
|
|||||||
build-tcg: $(BUILD_TCG_TARGET_RULES)
|
build-tcg: $(BUILD_TCG_TARGET_RULES)
|
||||||
|
|
||||||
.PHONY: check-tcg
|
.PHONY: check-tcg
|
||||||
.ninja-goals.check-tcg = all $(if $(CONFIG_PLUGIN),test-plugins)
|
.ninja-goals.check-tcg = all
|
||||||
check-tcg: $(RUN_TCG_TARGET_RULES)
|
check-tcg: $(RUN_TCG_TARGET_RULES)
|
||||||
|
|
||||||
.PHONY: clean-tcg
|
.PHONY: clean-tcg
|
||||||
|
@ -80,10 +80,8 @@ if 'CONFIG_TCG' in config_all
|
|||||||
subdir('fp')
|
subdir('fp')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tcg').allowed()
|
if get_option('plugins')
|
||||||
if 'CONFIG_PLUGIN' in config_host
|
subdir('plugin')
|
||||||
subdir('plugin')
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
subdir('unit')
|
subdir('unit')
|
||||||
|
Loading…
Reference in New Issue
Block a user