From 346c8a767a47de287a771ebeaa4448e37cf22432 Mon Sep 17 00:00:00 2001
From: "Bobby R. Bruce" <bbruce@ucdavis.edu>
Date: Thu, 23 Jul 2020 09:29:51 -0700
Subject: [PATCH] utils,tests: Enable passing of build args to
 compiler-tests.sh

Previously we passed "-j `nproc`" to the scons. This a greedy approach
that should not be default. This change was introduced so the "-j" flag
may be passed via the "util/compiler-tests.sh" script.

Change-Id: I2e891ae3a9819770bd3ef15b95b81b7f5b71f7fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31734
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
---
 util/compiler-tests.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/util/compiler-tests.sh b/util/compiler-tests.sh
index c586c273e..c8fce4b29 100755
--- a/util/compiler-tests.sh
+++ b/util/compiler-tests.sh
@@ -8,7 +8,6 @@
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 gem5_root="${dir}/.."
 build_dir="${gem5_root}/build"
-num_cores=`nproc`
 
 # All Docker images in the gem5 testing GCR which we want to compile with.
 images=("gcc-version-10"
@@ -61,7 +60,7 @@ builds_per_compiler=1
 base_url="gcr.io/gem5-test"
 
 # Arguments passed into scons on every build target test.
-build_args="-j ${num_cores}"
+build_args="$@"
 
 # Testing directory variables
 mkdir -p "${build_dir}" # Create the build directory if it doesn't exist.
-- 
2.30.2