[llvm] [Release] Don't build during test-release.sh Phase 3 install (PR #82001)

Rainer Orth via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 04:39:52 PST 2024


================
@@ -537,6 +537,11 @@ function build_llvmCore() {
         InstallTarget="$InstallTarget install-builtins"
       fi
     fi
+    if [ "$Phase" -eq "3" ]; then
+      # Build everything at once, with the proper parallelism and verbosity,
+      # in Phase 3.
+      BuildTarget=
----------------
rorth wrote:

IIUC, `BuildTarget` is global, so stays unchanged from previous Phases unless reset.  That's what I see in the build logs when comparing `rc1` (with unchanged `test-release.sh`) and `rc2` (with locally patched `test-release.sh`):

`rc1`:
```
 Phase 3: Building llvmCore
[...]
# Compiling llvm 18.1.0-rc1 Release
# ninja -j 8 -v
[1/4140
[...]
# Installing llvm 18.1.0-rc1 Release
# ninja install
[1/4093] Creating export file for LLVMHello
[2/4093] Building CXX object lib/MCA/CMakeFiles/LLVMMCA.dir/HardwareUnits/HardwareUnit.cpp.o
```
vs. `rc2`:
```
# Phase 3: Building llvmCore
[...]
# Compiling llvm 18.1.0-rc2 Release
# ninja -j 12 -v
[1/8225]
[...]
# Installing llvm 18.1.0-rc2 Release
# ninja install
[0/8] Performing build step for 'builtins'
```
i.e. with the patched script, in Phase 3 way more targets are actually built (with proper `-v` and `-jN`) in the build phase and nothing's built during `ninja install`, as it should be (and where the default parallelism does no harm).

https://github.com/llvm/llvm-project/pull/82001


More information about the llvm-commits mailing list