diff options
author | Patrick Georgi <pgeorgi@google.com> | 2017-01-30 15:27:35 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2017-01-31 18:51:47 +0100 |
commit | be182ad380bbb335fb5d1d746f0f8ce4a113b2f2 (patch) | |
tree | 6171b4f70239cfd343d29b91d80336653880a9b1 /util/xcompile | |
parent | 7328cf948ec0c56750e433dc6db73b118a480836 (diff) |
util/xcompile: parallelize compiler checks
Speed up the execution of this script from ~6 seconds to ~1 on my
system.
There are some changes to its output, but they're actually _more_
correct: so far, architectures without compiler support kept compiler
options for architectures that ran successfully earlier.
Change-Id: I0532ea2178fbedb114a75cfd5ba39301e534e742
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/18262
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/xcompile')
-rwxr-xr-x | util/xcompile/xcompile | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 90220f6c5c..32665f85ef 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -56,9 +56,6 @@ clean_up() { fi } -# Create temporary file(s). -TMPFILE="$(mktemp /tmp/temp.XXXXXX 2>/dev/null || echo /tmp/temp.coreboot.$RANDOM)" -touch "$TMPFILE" trap clean_up EXIT @@ -438,11 +435,24 @@ test_architecture() { fi } -# This loops over all supported architectures. +OUT="$(mktemp /tmp/temp.XXXXXX 2>/dev/null || echo /tmp/temp.coreboot.$RANDOM)" +rm -f $OUT + for architecture in $SUPPORTED_ARCHITECTURES; do + ( + TMPFILE="$(mktemp /tmp/temp.XXXXXX 2>/dev/null || echo /tmp/temp.coreboot.$RANDOM)" + touch $TMPFILE test_architecture "$architecture" detect_special_flags "$architecture" detect_compiler_runtime "$architecture" report_arch_toolchain + clean_up + ) > $OUT.$architecture & +done +wait + +for architecture in $SUPPORTED_ARCHITECTURES; do + cat $OUT.$architecture + rm -f $OUT.$architecture done echo XCOMPILE_COMPLETE:=1 |