| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 Tee('Starting build\n', log) | 172 Tee('Starting build\n', log) |
| 173 | 173 |
| 174 # Do a clobber build. | 174 # Do a clobber build. |
| 175 shutil.rmtree(LLVM_BOOTSTRAP_DIR, ignore_errors=True) | 175 shutil.rmtree(LLVM_BOOTSTRAP_DIR, ignore_errors=True) |
| 176 shutil.rmtree(LLVM_BOOTSTRAP_INSTALL_DIR, ignore_errors=True) | 176 shutil.rmtree(LLVM_BOOTSTRAP_INSTALL_DIR, ignore_errors=True) |
| 177 shutil.rmtree(LLVM_BUILD_DIR, ignore_errors=True) | 177 shutil.rmtree(LLVM_BUILD_DIR, ignore_errors=True) |
| 178 | 178 |
| 179 opt_flags = [] | 179 opt_flags = [] |
| 180 if sys.platform.startswith('linux'): | 180 if sys.platform.startswith('linux'): |
| 181 opt_flags += ['--lto-gold-plugin'] | 181 opt_flags += ['--lto'] |
| 182 build_cmd = [sys.executable, os.path.join(THIS_DIR, 'update.py'), | 182 build_cmd = [sys.executable, os.path.join(THIS_DIR, 'update.py'), |
| 183 '--bootstrap', '--force-local-build', | 183 '--bootstrap', '--force-local-build', |
| 184 '--run-tests'] + opt_flags | 184 '--run-tests'] + opt_flags |
| 185 TeeCmd(build_cmd, log) | 185 TeeCmd(build_cmd, log) |
| 186 | 186 |
| 187 stamp = open(STAMP_FILE).read().rstrip() | 187 stamp = open(STAMP_FILE).read().rstrip() |
| 188 if stamp != expected_stamp: | 188 if stamp != expected_stamp: |
| 189 print 'Actual stamp (%s) != expected stamp (%s).' % (stamp, expected_stamp) | 189 print 'Actual stamp (%s) != expected stamp (%s).' % (stamp, expected_stamp) |
| 190 return 1 | 190 return 1 |
| 191 | 191 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 210 'lib/libBlinkGCPlugin.' + so_ext, | 210 'lib/libBlinkGCPlugin.' + so_ext, |
| 211 ]) | 211 ]) |
| 212 if sys.platform == 'darwin': | 212 if sys.platform == 'darwin': |
| 213 want.extend([# Copy only the OSX (ASan and profile) and iossim (ASan) | 213 want.extend([# Copy only the OSX (ASan and profile) and iossim (ASan) |
| 214 # runtime libraries: | 214 # runtime libraries: |
| 215 'lib/clang/*/lib/darwin/*asan_osx*', | 215 'lib/clang/*/lib/darwin/*asan_osx*', |
| 216 'lib/clang/*/lib/darwin/*asan_iossim*', | 216 'lib/clang/*/lib/darwin/*asan_iossim*', |
| 217 'lib/clang/*/lib/darwin/*profile_osx*', | 217 'lib/clang/*/lib/darwin/*profile_osx*', |
| 218 ]) | 218 ]) |
| 219 elif sys.platform.startswith('linux'): | 219 elif sys.platform.startswith('linux'): |
| 220 want.append('bin/lld') |
| 220 # Copy the libstdc++.so.6 we linked Clang against so it can run. | 221 # Copy the libstdc++.so.6 we linked Clang against so it can run. |
| 221 want.append('lib/libstdc++.so.6') | 222 want.append('lib/libstdc++.so.6') |
| 222 # Copy only | 223 # Copy only |
| 223 # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a , | 224 # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a , |
| 224 # but not dfsan. | 225 # but not dfsan. |
| 225 want.extend(['lib/clang/*/lib/linux/*[atm]san*', | 226 want.extend(['lib/clang/*/lib/linux/*[atm]san*', |
| 226 'lib/clang/*/lib/linux/*ubsan*', | 227 'lib/clang/*/lib/linux/*ubsan*', |
| 227 'lib/clang/*/lib/linux/*libclang_rt.san*', | 228 'lib/clang/*/lib/linux/*libclang_rt.san*', |
| 228 'lib/clang/*/lib/linux/*profile*', | 229 'lib/clang/*/lib/linux/*profile*', |
| 229 'lib/clang/*/msan_blacklist.txt', | 230 'lib/clang/*/msan_blacklist.txt', |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 with tarfile.open(objdumpdir + '.tgz', 'w:gz') as tar: | 298 with tarfile.open(objdumpdir + '.tgz', 'w:gz') as tar: |
| 298 tar.add(os.path.join(objdumpdir, 'bin'), arcname='bin', | 299 tar.add(os.path.join(objdumpdir, 'bin'), arcname='bin', |
| 299 filter=PrintTarProgress) | 300 filter=PrintTarProgress) |
| 300 MaybeUpload(args, objdumpdir, platform) | 301 MaybeUpload(args, objdumpdir, platform) |
| 301 | 302 |
| 302 # FIXME: Warn if the file already exists on the server. | 303 # FIXME: Warn if the file already exists on the server. |
| 303 | 304 |
| 304 | 305 |
| 305 if __name__ == '__main__': | 306 if __name__ == '__main__': |
| 306 sys.exit(main()) | 307 sys.exit(main()) |
| OLD | NEW |