Index: tools/clang/scripts/package.py |
diff --git a/tools/clang/scripts/package.py b/tools/clang/scripts/package.py |
index be8498f527e123da01ccffcf952ea5472d8e1a9e..a44d49741381e3c7747291de76bca7d2a67709df 100755 |
--- a/tools/clang/scripts/package.py |
+++ b/tools/clang/scripts/package.py |
@@ -149,12 +149,13 @@ def main(): |
elif sys.platform.startswith('linux'): |
# Copy only |
# lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a , |
- # but not dfsan. |
+ # but not dfsan. Also, copy LLVM Gold plugin. |
want.extend(['lib/clang/*/lib/linux/*[atm]san*', |
'lib/clang/*/lib/linux/*ubsan*', |
'lib/clang/*/lib/linux/*libclang_rt.san*', |
'lib/clang/*/lib/linux/*profile*', |
'lib/clang/*/msan_blacklist.txt', |
+ 'lib/LLVMgold.so', |
]) |
elif sys.platform == 'win32': |
want.extend(['lib/clang/*/lib/windows/clang_rt.asan*.dll', |
@@ -209,9 +210,19 @@ def main(): |
tar_entries = ['bin', 'lib', 'buildlog.txt'] |
if sys.platform == 'darwin': |
tar_entries += ['include'] |
- with tarfile.open(pdir + '.tgz', 'w:gz') as tar: |
+ tar_mode = 'w:gz' |
+ tar_ext = '.tgz' |
+ # On Linux, we use xz for compression that is about 35% more efficient |
+ # than gzip on Clang toolchain archives. |
+ if sys.platform.startswith('linux'): |
+ tar_mode = 'w' |
+ tar_ext = '.tar' |
+ with tarfile.open(pdir + tar_ext, tar_mode) as tar: |
for entry in tar_entries: |
tar.add(os.path.join(pdir, entry), arcname=entry, filter=PrintTarProgress) |
+ if sys.platform.startswith('linux'): |
+ subprocess.call(['xz', '-z', '-9', pdir+tar_ext]) |
+ tar_ext = '.tar.xz' |
if sys.platform == 'darwin': |
platform = 'Mac' |
@@ -221,8 +232,9 @@ def main(): |
platform = 'Linux_x64' |
print 'To upload, run:' |
- print ('gsutil cp -a public-read %s.tgz ' |
- 'gs://chromium-browser-clang/%s/%s.tgz') % (pdir, platform, pdir) |
+ print ('gsutil cp -a public-read %s%s ' |
+ 'gs://chromium-browser-clang/%s/%s%s') % |
+ (pdir, tar_ext, platform, pdir, tar_ext) |
# Zip up gold plugin on Linux. |
hans
2015/10/05 20:53:57
Bundling the plugin makes this code unnecessary.
|
if sys.platform.startswith('linux'): |