Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
configure: add --disable-colo-proxy option
Add option to not build filter-rewriter and colo-compare when
they are not needed.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230515130640.46035-2-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and Juan Quintela committed May 18, 2023
1 parent 266ccbb commit 6c1e390
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions meson_options.txt
Expand Up @@ -293,6 +293,8 @@ option('live_block_migration', type: 'feature', value: 'auto',
description: 'block migration in the main migration stream')
option('replication', type: 'feature', value: 'auto',
description: 'replication support')
option('colo_proxy', type: 'feature', value: 'auto',
description: 'colo-proxy support')
option('bochs', type: 'feature', value: 'auto',
description: 'bochs image format support')
option('cloop', type: 'feature', value: 'auto',
Expand Down
13 changes: 10 additions & 3 deletions net/meson.build
@@ -1,13 +1,10 @@
softmmu_ss.add(files(
'announce.c',
'checksum.c',
'colo-compare.c',
'colo.c',
'dump.c',
'eth.c',
'filter-buffer.c',
'filter-mirror.c',
'filter-rewriter.c',
'filter.c',
'hub.c',
'net-hmp-cmds.c',
Expand All @@ -19,6 +16,16 @@ softmmu_ss.add(files(
'util.c',
))

if get_option('replication').allowed() or \
get_option('colo_proxy').allowed()
softmmu_ss.add(files('colo-compare.c'))
softmmu_ss.add(files('colo.c'))
endif

if get_option('colo_proxy').allowed()
softmmu_ss.add(files('filter-rewriter.c'))
endif

softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c'))

if have_l2tpv3
Expand Down
3 changes: 3 additions & 0 deletions scripts/meson-buildoptions.sh
Expand Up @@ -86,6 +86,7 @@ meson_options_help() {
printf "%s\n" ' capstone Whether and how to find the capstone library'
printf "%s\n" ' cloop cloop image format support'
printf "%s\n" ' cocoa Cocoa user interface (macOS only)'
printf "%s\n" ' colo-proxy colo-proxy support'
printf "%s\n" ' coreaudio CoreAudio sound support'
printf "%s\n" ' crypto-afalg Linux AF_ALG crypto backend driver'
printf "%s\n" ' curl CURL block device driver'
Expand Down Expand Up @@ -245,6 +246,8 @@ _meson_option_parse() {
--disable-cloop) printf "%s" -Dcloop=disabled ;;
--enable-cocoa) printf "%s" -Dcocoa=enabled ;;
--disable-cocoa) printf "%s" -Dcocoa=disabled ;;
--enable-colo-proxy) printf "%s" -Dcolo_proxy=enabled ;;
--disable-colo-proxy) printf "%s" -Dcolo_proxy=disabled ;;
--enable-coreaudio) printf "%s" -Dcoreaudio=enabled ;;
--disable-coreaudio) printf "%s" -Dcoreaudio=disabled ;;
--enable-coroutine-pool) printf "%s" -Dcoroutine_pool=true ;;
Expand Down
7 changes: 7 additions & 0 deletions stubs/colo-compare.c
@@ -0,0 +1,7 @@
#include "qemu/osdep.h"
#include "qemu/notify.h"
#include "net/colo-compare.h"

void colo_compare_cleanup(void)
{
}
1 change: 1 addition & 0 deletions stubs/meson.build
Expand Up @@ -46,6 +46,7 @@ stub_ss.add(files('target-monitor-defs.c'))
stub_ss.add(files('trace-control.c'))
stub_ss.add(files('uuid.c'))
stub_ss.add(files('colo.c'))
stub_ss.add(files('colo-compare.c'))
stub_ss.add(files('vmstate.c'))
stub_ss.add(files('vm-stop.c'))
stub_ss.add(files('win32-kbd-hook.c'))
Expand Down

0 comments on commit 6c1e390

Please sign in to comment.