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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 if sys.platform == 'win32': | 203 if sys.platform == 'win32': |
204 want.append('bin/clang-cl.exe') | 204 want.append('bin/clang-cl.exe') |
205 want.append('bin/lld-link.exe') | 205 want.append('bin/lld-link.exe') |
206 else: | 206 else: |
207 so_ext = 'dylib' if sys.platform == 'darwin' else 'so' | 207 so_ext = 'dylib' if sys.platform == 'darwin' else 'so' |
208 want.extend(['bin/clang', | 208 want.extend(['bin/clang', |
209 'lib/libFindBadConstructs.' + so_ext, | 209 'lib/libFindBadConstructs.' + so_ext, |
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 and iossim (ASan and profile) runtime | 213 want.extend([# Copy only the OSX (ASan and profile) and iossim (ASan) |
214 # 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 'lib/clang/*/lib/darwin/*profile_iossim*', | |
219 ]) | 218 ]) |
220 elif sys.platform.startswith('linux'): | 219 elif sys.platform.startswith('linux'): |
221 # Copy the libstdc++.so.6 we linked Clang against so it can run. | 220 # Copy the libstdc++.so.6 we linked Clang against so it can run. |
222 want.append('lib/libstdc++.so.6') | 221 want.append('lib/libstdc++.so.6') |
223 # Copy only | 222 # Copy only |
224 # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a , | 223 # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a , |
225 # but not dfsan. | 224 # but not dfsan. |
226 want.extend(['lib/clang/*/lib/linux/*[atm]san*', | 225 want.extend(['lib/clang/*/lib/linux/*[atm]san*', |
227 'lib/clang/*/lib/linux/*ubsan*', | 226 'lib/clang/*/lib/linux/*ubsan*', |
228 'lib/clang/*/lib/linux/*libclang_rt.san*', | 227 'lib/clang/*/lib/linux/*libclang_rt.san*', |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 with tarfile.open(golddir + '.tgz', 'w:gz') as tar: | 286 with tarfile.open(golddir + '.tgz', 'w:gz') as tar: |
288 tar.add(os.path.join(golddir, 'lib'), arcname='lib', | 287 tar.add(os.path.join(golddir, 'lib'), arcname='lib', |
289 filter=PrintTarProgress) | 288 filter=PrintTarProgress) |
290 MaybeUpload(args, golddir, platform) | 289 MaybeUpload(args, golddir, platform) |
291 | 290 |
292 # FIXME: Warn if the file already exists on the server. | 291 # FIXME: Warn if the file already exists on the server. |
293 | 292 |
294 | 293 |
295 if __name__ == '__main__': | 294 if __name__ == '__main__': |
296 sys.exit(main()) | 295 sys.exit(main()) |
OLD | NEW |