UPSTREAM: 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.
BUG=none
BRANCH=none
TEST=none
Change-Id: I9944c810f432266e99a70a3c3cd9f1fc0fd5ef35
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: be182ad380
Original-Change-Id: I0532ea2178fbedb114a75cfd5ba39301e534e742
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://review.coreboot.org/18262
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/435402
This commit is contained in:
parent
3d5a3c35c5
commit
54fea2b927
1 changed files with 14 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue