[llvm] 79a2cf5 - test-release.sh: Default to letting ninja select the number of build jobs (#73187)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 26 07:48:56 PST 2023
Author: Tom Stellard
Date: 2023-11-26T07:48:51-08:00
New Revision: 79a2cf5da31913d75056fa272c784272fcc1278d
URL: https://github.com/llvm/llvm-project/commit/79a2cf5da31913d75056fa272c784272fcc1278d
DIFF: https://github.com/llvm/llvm-project/commit/79a2cf5da31913d75056fa272c784272fcc1278d.diff
LOG: test-release.sh: Default to letting ninja select the number of build jobs (#73187)
ninja defaults to using ncpus + 2 build jobs, and this extra parallelism
helps the script complete faster in my testing on the GitHub runners.
Added:
Modified:
llvm/utils/release/test-release.sh
Removed:
################################################################################
diff --git a/llvm/utils/release/test-release.sh b/llvm/utils/release/test-release.sh
index 63bf3974a987d20..f38134e3d22d8f5 100755
--- a/llvm/utils/release/test-release.sh
+++ b/llvm/utils/release/test-release.sh
@@ -246,6 +246,8 @@ if [ "$Release" != "test" ]; then
fi
fi
+UserNumJobs="$NumJobs"
+
# Figure out how many make processes to run.
if [ -z "$NumJobs" ]; then
NumJobs=`sysctl -n hw.activecpu 2> /dev/null || true`
@@ -260,6 +262,13 @@ if [ -z "$NumJobs" ]; then
NumJobs=3
fi
+if [ "$MAKE" = "ninja" ] && [ -z "$UserNumJobs" ]; then
+ # Rely on default ninja job numbers
+ J_ARG=""
+else
+ J_ARG="-j $NumJobs"
+fi
+
# Projects list
projects="llvm;clang"
if [ $do_clang_tools = "yes" ]; then
@@ -484,8 +493,8 @@ function build_llvmCore() {
cd $ObjDir
echo "# Compiling llvm $Release-$RC $Flavor"
- echo "# ${MAKE} -j $NumJobs $Verbose"
- ${MAKE} -j $NumJobs $Verbose $BuildTarget \
+ echo "# ${MAKE} $J_ARG $Verbose"
+ ${MAKE} $J_ARG $Verbose $BuildTarget \
2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log > $redir
echo "# Installing llvm $Release-$RC $Flavor"
@@ -508,7 +517,7 @@ function test_llvmCore() {
fi
cd $ObjDir
- if ! ( ${MAKE} -j $NumJobs $KeepGoing $Verbose check-all \
+ if ! ( ${MAKE} $J_ARG $KeepGoing $Verbose check-all \
2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log ) ; then
deferred_error $Phase $Flavor "check-all failed"
fi
@@ -519,7 +528,7 @@ function test_llvmCore() {
cmake $TestSuiteSrcDir -G "$generator" -DTEST_SUITE_LIT=$Lit \
-DTEST_SUITE_HOST_CC=$build_compiler
- if ! ( ${MAKE} -j $NumJobs $KeepGoing $Verbose check \
+ if ! ( ${MAKE} $J_ARG $KeepGoing $Verbose check \
2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log ) ; then
deferred_error $Phase $Flavor "test suite failed"
fi
More information about the llvm-commits
mailing list