test-release.sh: Only build clang for stage1 and stage2
authorTom Stellard <tstellar@redhat.com>
Wed, 25 Jan 2023 02:09:13 +0000 (18:09 -0800)
committerTom Stellard <tstellar@redhat.com>
Wed, 25 Jan 2023 02:09:20 +0000 (18:09 -0800)
The stage1 and stage2 builds aren't packaged, so we only need to build
enough of the toolchain to build the next phase.

Reviewed By: thieta, amyk

Differential Revision: https://reviews.llvm.org/D141552

llvm/utils/release/test-release.sh

index 0c21426..0818cb8 100755 (executable)
@@ -404,12 +404,17 @@ function configure_llvmCore() {
             ;;
     esac
 
-    project_list=${projects// /;}
-    # Leading spaces will result in ";<runtime name>". This causes a CMake
-    # error because the empty string before the first ';' is treated as an
-    # unknown runtime name.
-    runtimes=$(echo $runtimes | sed -e 's/^\s*//')
-    runtime_list=${runtimes// /;}
+    if [ "$Phase" -eq "3" ]; then
+      project_list=${projects// /;}
+      # Leading spaces will result in ";<runtime name>". This causes a CMake
+      # error because the empty string before the first ';' is treated as an
+      # unknown runtime name.
+      runtimes=$(echo $runtimes | sed -e 's/^\s*//')
+      runtime_list=${runtimes// /;}
+    else
+      project_list="clang"
+      runtime_list=""
+    fi
     echo "# Using C compiler: $c_compiler"
     echo "# Using C++ compiler: $cxx_compiler"