[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] configure: Fail when specified cross compiler cannot be foun
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] configure: Fail when specified cross compiler cannot be found |
Date: |
Fri, 18 Dec 2020 11:05:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
On 17/12/20 18:56, Alex Bennée wrote:
To be honest at the moment the information is a little hidden at the top
of the output. It would be nice if we could teach meson to echo it in
it's nice coloured output.
Paolo,
Any ideas for the cleanest way to do that?
The code in configure is pretty small:
(for i in $cross_cc_vars; do
export $i
done
export target_list source_path use_containers
$source_path/tests/tcg/configure.sh)
configure would place the cross-cc variables (which are really just
command line options) in a file, something like config-cross-cc.mak, and
the Meson translation of the above would be
env = environment()
foreach k, v : keyval.load(meson.current_build_dir() /
'config-cross-cc.mak')
env.set(k, v)
endforeach
env.set('target_list', ','.join(target_dirs))
env.set('source_path', meson.source_root())
env.set('use_containers',
'CROSS_CC_CONTAINERS' in config_host ? 'yes' : 'no')
message(run_command(files('tests/tcg/configure.sh'), env: env).stdout())
For a bit more polish, one could make tests/tcg/configure.sh print the
result in keyval format, parse it back from meson as a dictionary with
keyval.load(), and pass the result to summary().
Paolo