qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH] meson.build: expose TCG cross compiler information in summary
Date: Tue, 16 Feb 2021 00:09:07 +0100	[thread overview]
Message-ID: <CABgObfbZqQkb4DiPVABS6VbWTEdL+Xi_9XGtkf+di5Kf4L2X9A@mail.gmail.com> (raw)
In-Reply-To: <20210215225511.23286-1-alex.bennee@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2472 bytes --]

Very nice, but perhaps you can reuse target_dirs and test for each
individual tests/tcg/config-$target.mak with fs.exists(), instead of using
find?

Thanks,

Paolo

Il lun 15 feb 2021, 23:55 Alex Bennée <alex.bennee@linaro.org> ha scritto:

> Blink and you miss the cross TCG compiler stuff so lets display it
> with the rest of the compiler information.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  meson.build            | 18 ++++++++++++++++++
>  tests/tcg/configure.sh |  8 --------
>  2 files changed, 18 insertions(+), 8 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index a923f249d8..3c8135add2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2508,6 +2508,24 @@ endif
>  summary_info += {'strip binaries':    get_option('strip')}
>  summary_info += {'sparse':            sparse.found() ? sparse.full_path()
> : false}
>  summary_info += {'mingw32 support':   targetos == 'windows'}
> +
> +# snarf the cross-compilation information for tests
> +tcg_compile_config = run_command('find',
> +                                 meson.current_build_dir() / 'tests/tcg',
> +                                 '-iname',
> '*.mak').stdout().strip().split('\n')
> +foreach tcg_mak: tcg_compile_config
> +  config_cross_tcg = keyval.load(tcg_mak)
> +  target = config_cross_tcg['TARGET_NAME']
> +  compiler = ''
> +  if 'DOCKER_CROSS_CC_GUEST' in config_cross_tcg
> +    summary_info += {target + ' tests':
> config_cross_tcg['DOCKER_CROSS_CC_GUEST'] +
> +                                      ' via ' +
> config_cross_tcg['DOCKER_IMAGE']}
> +  elif 'CROSS_CC_GUEST' in config_cross_tcg
> +    summary_info += {target + ' tests'
> +                     : config_cross_tcg['CROSS_CC_GUEST'] }
> +  endif
> +endforeach
> +
>  summary(summary_info, bool_yn: true, section: 'Compilation')
>
>  # Targets and accelerators
> diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
> index e1b70e25f2..77a18fd289 100755
> --- a/tests/tcg/configure.sh
> +++ b/tests/tcg/configure.sh
> @@ -257,11 +257,3 @@ for target in $target_list; do
>      echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak
>    fi
>  done
> -
> -# report container support state
> -echo "cross containers  $container"
> -
> -if test -n "$enabled_cross_compilers"; then
> -    echo
> -    echo "NOTE: guest cross-compilers enabled:$enabled_cross_compilers"
> -fi
> --
> 2.20.1
>
>

[-- Attachment #2: Type: text/html, Size: 3329 bytes --]

      reply	other threads:[~2021-02-15 23:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 22:55 [PATCH] meson.build: expose TCG cross compiler information in summary Alex Bennée
2021-02-15 23:09 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABgObfbZqQkb4DiPVABS6VbWTEdL+Xi_9XGtkf+di5Kf4L2X9A@mail.gmail.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).