Skip to content

Commit

Permalink
[release] Use the Bootstrapping build for building LLVM releases
Browse files Browse the repository at this point in the history
Instead of using the (now deprecated) Projects build for libcxx, libcxxabi,
libunwind and compiler-rt, this patch uses the Bootstrapping build. This
implies that Clang will be built from scratch, and then the runtimes will
be built using that just-built Clang instead of the system compiler.
This is the correct way of assembling a toolchain, since we don't want
to ship runtimes that were built with a non-Clang compiler (or a
potentially older Clang).

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

(cherry picked from commit 26a1830)
  • Loading branch information
ldionne committed Feb 2, 2022
1 parent 91632c8 commit c8bb177
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions llvm/utils/release/test-release.sh
Expand Up @@ -236,16 +236,17 @@ fi

# Projects list
projects="llvm clang clang-tools-extra"
runtimes=""
if [ $do_rt = "yes" ]; then
projects="$projects compiler-rt"
runtimes="$runtimes compiler-rt"
fi
if [ $do_libs = "yes" ]; then
projects="$projects libcxx"
runtimes="$runtimes libcxx"
if [ $do_libcxxabi = "yes" ]; then
projects="$projects libcxxabi"
runtimes="$runtimes libcxxabi"
fi
if [ $do_libunwind = "yes" ]; then
projects="$projects libunwind"
runtimes="$runtimes libunwind"
fi
fi
case $do_test_suite in
Expand Down Expand Up @@ -377,6 +378,7 @@ function configure_llvmCore() {
esac

project_list=${projects// /;}
runtime_list=${runtimes// /;}
echo "# Using C compiler: $c_compiler"
echo "# Using C++ compiler: $cxx_compiler"

Expand All @@ -389,6 +391,7 @@ function configure_llvmCore() {
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DLLVM_ENABLE_PROJECTS="$project_list" \
-DLLVM_LIT_ARGS="-j $NumJobs" \
-DLLVM_ENABLE_RUNTIMES="$runtime_list" \
$ExtraConfigureFlags $BuildDir/llvm-project/llvm \
2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log
env CC="$c_compiler" CXX="$cxx_compiler" \
Expand All @@ -397,6 +400,7 @@ function configure_llvmCore() {
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DLLVM_ENABLE_PROJECTS="$project_list" \
-DLLVM_LIT_ARGS="-j $NumJobs" \
-DLLVM_ENABLE_RUNTIMES="$runtime_list" \
$ExtraConfigureFlags $BuildDir/llvm-project/llvm \
2>&1 | tee $LogDir/llvm.configure-Phase$Phase-$Flavor.log

Expand Down

0 comments on commit c8bb177

Please sign in to comment.