Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18262
-gerrit
commit fdb63e7cf38c114ced67a6f3d03fbeb442376876 Author: Patrick Georgi pgeorgi@google.com Date: Mon Jan 30 15:27:35 2017 +0100
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 --- util/xcompile/xcompile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 90220f6..ec295a9 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -58,7 +58,7 @@ clean_up() {
# Create temporary file(s). TMPFILE="$(mktemp /tmp/temp.XXXXXX 2>/dev/null || echo /tmp/temp.coreboot.$RANDOM)" -touch "$TMPFILE" +rm -f "$TMPFILE" trap clean_up EXIT
@@ -438,11 +438,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