We want to keep the container configuration inside configure for the firmware builds.
This reverts commit 522b299ca4316d8cad57f9496ffcba87dcc20719. Tested-by: Eric Farman <[email protected]> Reviewed-by: Pierrick Bouvier <[email protected]> Suggested-by: Paolo Bonzini <[email protected]> [AJB: untangle changes since] Signed-off-by: Alex Bennée <[email protected]> --- configure | 11 +++++++---- meson_options.txt | 4 ---- tests/tcg/meson.build | 25 ++++--------------------- 3 files changed, 11 insertions(+), 29 deletions(-) diff --git a/configure b/configure index bedde58b8cf..25d26376f12 100755 --- a/configure +++ b/configure @@ -260,7 +260,7 @@ ninja="" python= download="enabled" skip_meson=no -use_containers="" +use_containers="yes" rust="disabled" rust_target_triple="" @@ -727,11 +727,11 @@ for opt do ;; --disable-plugins) plugins="no" ;; - --enable-containers) # enabled by default + --enable-containers) use_containers="yes" ;; - --disable-containers) meson_option_add -Dcontainers=false + --disable-containers) use_containers="no" ;; - --container-command=*) meson_option_add -Dcontainer_command="$optarg" + --container-command=*) container_command="$optarg" ;; --rust-target-triple=*) rust_target_triple="$optarg" ;; @@ -1718,6 +1718,9 @@ echo all: >> $config_host_mak echo "SRC_PATH=$source_path" >> $config_host_mak echo "TARGET_DIRS=$target_list" >> $config_host_mak +if test "$container_command" != ""; then + echo "CONTAINER_COMMAND=$container_command" >> $config_host_mak +fi echo "SUBDIRS=$subdirs" >> $config_host_mak echo "PYTHON=$python" >> $config_host_mak echo "MKVENV_ENSUREGROUP=$mkvenv ensuregroup $mkvenv_online_flag" >> $config_host_mak diff --git a/meson_options.txt b/meson_options.txt index 66d3689d14c..218d003a80b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -389,7 +389,3 @@ option('rust', type: 'feature', value: 'disabled', description: 'Rust support') option('strict_rust_lints', type: 'boolean', value: false, description: 'Enable stricter set of Rust warnings') -option('containers', type: 'boolean', value: true, - description: 'use containers to cross compile tcg tests') -option('container_command', type: 'string', - description: 'command to build/run containers') diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build index ce208e686ff..e966774c8c2 100644 --- a/tests/tcg/meson.build +++ b/tests/tcg/meson.build @@ -79,28 +79,11 @@ if gdb.found() endif tcg_tests_summary += {'gdb': gdb} -docker_supported = false -container_command = false -if get_option('containers') - if get_option('container_command') != '' - # make sure command is working - container_command = get_option('container_command') - cmd = container_command.split() - run_command([cmd, 'info'], check: true) - docker_supported = true - docker_wrapper = [docker_wrapper, '--command', - container_command] - else - docker_probe = run_command(docker_wrapper, 'probe', check: false) - docker_supported = docker_probe.returncode() == 0 - if docker_supported - container_command = docker_probe.stdout().strip() - docker_wrapper = [docker_wrapper, '--command', - container_command] - endif - endif +docker_probe = run_command(docker_wrapper, 'probe', check: false) +docker_supported = docker_probe.returncode() == 0 +if docker_supported + docker_wrapper = [docker_wrapper, '--command', docker_probe.stdout().strip()] endif -tcg_tests_summary += {'container command': container_command} # plugins come first, as we need to build the list test_plugins = {} -- 2.47.3
