Use maximum compression when packaging release tarballs.

Summary:
Since a full run of test-release.sh takes many hours (at least on my
poor systems), we might as well spend some extra time compressing the
tarball, in return for a quite a bit of gains for uploading and
downloading it.

As an example, the 10.0.0-rc4 .tar.xz tarball shrinks from 465MiB to
306MiB, about 52% smaller.

Reviewers: hans, tstellar, rovka

Reviewed By: hans

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76192
This commit is contained in:
Dimitry Andric 2020-04-15 20:30:15 +02:00
parent 9daadcec81
commit 7fb79105fe

View File

@ -470,9 +470,9 @@ function package_release() {
cd $BuildDir/Phase3/Release
mv llvmCore-$Release-$RC.install/usr/local $Package
if [ "$use_gzip" = "yes" ]; then
tar cfz $BuildDir/$Package.tar.gz $Package
tar cf - $Package | gzip -9c > $BuildDir/$Package.tar.gz
else
tar cfJ $BuildDir/$Package.tar.xz $Package
tar cf - $Package | xz -9ce > $BuildDir/$Package.tar.xz
fi
mv $Package llvmCore-$Release-$RC.install/usr/local
cd $cwd