meson.build: expose TCG cross compiler information in summary
PATCH 1/1 meson.build: expose TCG cross compiler information in summary
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 <[email protected]>
--- meson.build | 18 ++++++++++++++++++ tests/tcg/configure.sh | 8 -------- 2 files changed, 18 insertions(+), 8 deletions(-)
meson.build +18 -0
@@ -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
tests/tcg/configure.sh +0 -8
@@ -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
Signature · 1 line
2.20.1
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 <[email protected]> ha scritto:
Quoted 62 lines
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 <[email protected]>--- meson.build | 18 ++++++++++++++++++ tests/tcg/configure.sh | 8 -------- 2 files changed, 18 insertions(+), 8 deletions(-)meson.build +11
-0@@ -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']}meson.build +6
-0+ 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 acceleratorstests/tcg/configure.sh +0
-9@@ -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