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

Side by Side Diff: tools/clang/scripts/package.py

Issue 2896663002: Package the translation_unit tool as part of building the clang package. (Closed)
Patch Set: don't include unistd.h Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « build/download_translation_unit_tool.py ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """This script will check out llvm and clang, and then package the results up 6 """This script will check out llvm and clang, and then package the results up
7 to a tgz file.""" 7 to a tgz file."""
8 8
9 import argparse 9 import argparse
10 import fnmatch 10 import fnmatch
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 objdumpdir = 'llvmobjdump-' + stamp 358 objdumpdir = 'llvmobjdump-' + stamp
359 shutil.rmtree(objdumpdir, ignore_errors=True) 359 shutil.rmtree(objdumpdir, ignore_errors=True)
360 os.makedirs(os.path.join(objdumpdir, 'bin')) 360 os.makedirs(os.path.join(objdumpdir, 'bin'))
361 shutil.copy(os.path.join(LLVM_RELEASE_DIR, 'bin', 'llvm-objdump' + exe_ext), 361 shutil.copy(os.path.join(LLVM_RELEASE_DIR, 'bin', 'llvm-objdump' + exe_ext),
362 os.path.join(objdumpdir, 'bin')) 362 os.path.join(objdumpdir, 'bin'))
363 with tarfile.open(objdumpdir + '.tgz', 'w:gz') as tar: 363 with tarfile.open(objdumpdir + '.tgz', 'w:gz') as tar:
364 tar.add(os.path.join(objdumpdir, 'bin'), arcname='bin', 364 tar.add(os.path.join(objdumpdir, 'bin'), arcname='bin',
365 filter=PrintTarProgress) 365 filter=PrintTarProgress)
366 MaybeUpload(args, objdumpdir, platform) 366 MaybeUpload(args, objdumpdir, platform)
367 367
368 # Zip up the translation_unit tool.
369 translation_unit_dir = 'translation_unit-' + stamp
370 shutil.rmtree(translation_unit_dir, ignore_errors=True)
371 os.makedirs(os.path.join(translation_unit_dir, 'bin'))
372 shutil.copy(os.path.join(LLVM_RELEASE_DIR, 'bin', 'translation_unit' +
373 exe_ext),
374 os.path.join(translation_unit_dir, 'bin'))
375 with tarfile.open(translation_unit_dir + '.tgz', 'w:gz') as tar:
376 tar.add(os.path.join(translation_unit_dir, 'bin'), arcname='bin',
377 filter=PrintTarProgress)
378 MaybeUpload(args, translation_unit_dir, platform)
379
368 if sys.platform == 'win32' and args.upload: 380 if sys.platform == 'win32' and args.upload:
369 UploadPDBToSymbolServer() 381 UploadPDBToSymbolServer()
370 382
371 # FIXME: Warn if the file already exists on the server. 383 # FIXME: Warn if the file already exists on the server.
372 384
373 385
374 if __name__ == '__main__': 386 if __name__ == '__main__':
375 sys.exit(main()) 387 sys.exit(main())
OLDNEW
« no previous file with comments | « build/download_translation_unit_tool.py ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698