diff --git a/llvm/utils/release/test-release.sh b/llvm/utils/release/test-release.sh --- a/llvm/utils/release/test-release.sh +++ b/llvm/utils/release/test-release.sh @@ -40,6 +40,7 @@ do_polly="yes" do_mlir="yes" do_flang="yes" +do_silent_log="no" BuildDir="`pwd`" ExtraConfigureFlags="" ExportBranch="" @@ -75,6 +76,7 @@ echo " -no-polly Disable check-out & build Polly" echo " -no-mlir Disable check-out & build MLIR" echo " -no-flang Disable check-out & build Flang" + echo " -silent-log Don't output build logs to stdout" } while [ $# -gt 0 ]; do @@ -179,6 +181,9 @@ -no-flang ) do_flang="no" ;; + -silent-log ) + do_silent_log="yes" + ;; -help | --help | -h | --h | -\? ) usage exit 0 @@ -421,16 +426,22 @@ Verbose="-v" fi + redir="/dev/stdout" + if [ $do_silent_log == "yes" ]; then + echo "# Silencing build logs because of -silent-log flag..." + redir="/dev/null" + fi + cd $ObjDir echo "# Compiling llvm $Release-$RC $Flavor" echo "# ${MAKE} -j $NumJobs $Verbose" ${MAKE} -j $NumJobs $Verbose \ - 2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log + 2>&1 | tee $LogDir/llvm.make-Phase$Phase-$Flavor.log > $redir echo "# Installing llvm $Release-$RC $Flavor" echo "# ${MAKE} install" DESTDIR="${DestDir}" ${MAKE} install \ - 2>&1 | tee $LogDir/llvm.install-Phase$Phase-$Flavor.log + 2>&1 | tee $LogDir/llvm.install-Phase$Phase-$Flavor.log > $redir cd $BuildDir }