| OLD | NEW |
| 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 Loading... |
| 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()) |
| OLD | NEW |