Skip to content

Commit b9f51fa

Browse files
amy-kwantstellar
authored andcommitted
[test-release.sh] Set TEST_SUITE_HOST_CC to the release testing build compiler when compiling test-suite tools.
The tools used by test-suite are originally configured to compile with cc by default, and this is dictated by TEST_SUITE_HOST_CC. However, it is possible that on some systems that the version of cc may either not be present or it may not be able to compile the tools as it may be too old, which could be an issue seen during release testing. This patch updates the compiler to be the default build compiler that is used for release testing. If no such compiler it specified, then cc will be set as the test-suite tools build compiler by default (as it already is set under TEST_SUITE_HOST_CC). Differential Revision: https://reviews.llvm.org/D118357 (cherry picked from commit 413b35c)
1 parent 200390c commit b9f51fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/utils/release/test-release.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ function test_llvmCore() {
455455
if [ $do_test_suite = 'yes' ]; then
456456
cd $TestSuiteBuildDir
457457
env CC="$c_compiler" CXX="$cxx_compiler" \
458-
cmake $TestSuiteSrcDir -G "$generator" -DTEST_SUITE_LIT=$Lit
458+
cmake $TestSuiteSrcDir -G "$generator" -DTEST_SUITE_LIT=$Lit \
459+
-DTEST_SUITE_HOST_CC=$build_compiler
459460

460461
if ! ( ${MAKE} -j $NumJobs $KeepGoing check \
461462
2>&1 | tee $LogDir/llvm.check-Phase$Phase-$Flavor.log ) ; then
@@ -551,6 +552,8 @@ for Flavor in $Flavors ; do
551552

552553
c_compiler="$CC"
553554
cxx_compiler="$CXX"
555+
build_compiler="$CC"
556+
[[ -z "$build_compiler" ]] && build_compiler="cc"
554557
llvmCore_phase1_objdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.obj
555558
llvmCore_phase1_destdir=$BuildDir/Phase1/$Flavor/llvmCore-$Release-$RC.install
556559

0 commit comments

Comments
 (0)