Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: tools/clang/scripts/package.py

Issue 1375213007: Clang toolchain on Linux: compress with XZ, include LLVM Gold plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/scripts/update.sh » ('j') | tools/clang/scripts/update.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'):
« no previous file with comments | « no previous file | tools/clang/scripts/update.sh » ('j') | tools/clang/scripts/update.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698