Skip to content

Commit 907ed77

Browse files
authored
test-release.sh: Only build the clang target in stage 1 and 2 (#72703)
This skips the build of all the unittests and llvm/clang tools, reducing the number of ninja targets from 4,826 to 3,816 in phase 1 and phase 2.
1 parent fb57f4e commit 907ed77

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

llvm/utils/release/test-release.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,17 @@ function build_llvmCore() {
465465
fi
466466
LitVerbose="-v"
467467

468+
InstallTarget="install"
469+
if [ "$Phase" -lt "3" ]; then
470+
BuildTarget="clang"
471+
InstallTarget="install-clang install-clang-resource-headers"
472+
# compiler-rt builtins is needed on AIX to have a functional Phase 1 clang.
473+
if [ "$System" = "AIX" -o "$Phase" != "1" ]; then
474+
BuildTarget="$BuildTarget runtimes"
475+
InstallTarget="$InstallTarget install-runtimes"
476+
fi
477+
fi
478+
468479
redir="/dev/stdout"
469480
if [ $do_silent_log == "yes" ]; then
470481
echo "# Silencing build logs because of -silent-log flag..."
@@ -474,12 +485,12 @@ function build_llvmCore() {
474485
cd $ObjDir
475486
echo "# Compiling llvm $Release-$RC $Flavor"
476487
echo "# ${MAKE} -j $NumJobs $Verbose"
477-
${MAKE} -j $NumJobs $Verbose \
488+
${MAKE} -j $NumJobs $Verbose $BuildTarget \
478489
2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log > $redir
479490

480491
echo "# Installing llvm $Release-$RC $Flavor"
481492
echo "# ${MAKE} install"
482-
DESTDIR="${DestDir}" ${MAKE} install \
493+
DESTDIR="${DestDir}" ${MAKE} $InstallTarget \
483494
2>&1 | tee $LogDir/llvm.install-Phase$Phase-$Flavor.log > $redir
484495
cd $BuildDir
485496
}

0 commit comments

Comments
 (0)