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

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

Issue 2572833003: Clang toolchain: checkout LLD on all platforms but Darwin. (Closed)
Patch Set: sync Created 3 years, 9 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 | « no previous file | 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 want.extend([# Copy only the OSX and iossim (ASan and profile) runtime 264 want.extend([# Copy only the OSX and iossim (ASan and profile) runtime
265 # libraries: 265 # libraries:
266 'lib/clang/*/lib/darwin/*asan_osx*', 266 'lib/clang/*/lib/darwin/*asan_osx*',
267 'lib/clang/*/lib/darwin/*asan_iossim*', 267 'lib/clang/*/lib/darwin/*asan_iossim*',
268 'lib/clang/*/lib/darwin/*profile_osx*', 268 'lib/clang/*/lib/darwin/*profile_osx*',
269 'lib/clang/*/lib/darwin/*profile_iossim*', 269 'lib/clang/*/lib/darwin/*profile_iossim*',
270 ]) 270 ])
271 elif sys.platform.startswith('linux'): 271 elif sys.platform.startswith('linux'):
272 # Copy the libstdc++.so.6 we linked Clang against so it can run. 272 # Copy the libstdc++.so.6 we linked Clang against so it can run.
273 want.append('lib/libstdc++.so.6') 273 want.append('lib/libstdc++.so.6')
274 # Add llvm-ar and lld for LTO.
275 want.append('bin/llvm-ar')
276 want.append('bin/lld')
274 # Copy only 277 # Copy only
275 # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a , 278 # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,profile}-*.a ,
276 # but not dfsan. 279 # but not dfsan.
277 want.extend(['lib/clang/*/lib/linux/*[atm]san*', 280 want.extend(['lib/clang/*/lib/linux/*[atm]san*',
278 'lib/clang/*/lib/linux/*ubsan*', 281 'lib/clang/*/lib/linux/*ubsan*',
279 'lib/clang/*/lib/linux/*libclang_rt.san*', 282 'lib/clang/*/lib/linux/*libclang_rt.san*',
280 'lib/clang/*/lib/linux/*profile*', 283 'lib/clang/*/lib/linux/*profile*',
281 'lib/clang/*/msan_blacklist.txt', 284 'lib/clang/*/msan_blacklist.txt',
282 ]) 285 ])
283 elif sys.platform == 'win32': 286 elif sys.platform == 'win32':
(...skipping 20 matching lines...) Expand all
304 subprocess.call(['strip', '-x', dest]) 307 subprocess.call(['strip', '-x', dest])
305 elif (sys.platform.startswith('linux') and 308 elif (sys.platform.startswith('linux') and
306 os.path.splitext(f)[1] in ['.so', '.a']): 309 os.path.splitext(f)[1] in ['.so', '.a']):
307 subprocess.call(['strip', '-g', dest]) 310 subprocess.call(['strip', '-g', dest])
308 311
309 # Set up symlinks. 312 # Set up symlinks.
310 if sys.platform != 'win32': 313 if sys.platform != 'win32':
311 os.symlink('clang', os.path.join(pdir, 'bin', 'clang++')) 314 os.symlink('clang', os.path.join(pdir, 'bin', 'clang++'))
312 os.symlink('clang', os.path.join(pdir, 'bin', 'clang-cl')) 315 os.symlink('clang', os.path.join(pdir, 'bin', 'clang-cl'))
313 316
317 if sys.platform.startswith('linux'):
318 os.symlink('lld', os.path.join(pdir, 'bin', 'ld.lld'))
319
314 # Copy libc++ headers. 320 # Copy libc++ headers.
315 if sys.platform == 'darwin': 321 if sys.platform == 'darwin':
316 shutil.copytree(os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'include', 'c++'), 322 shutil.copytree(os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'include', 'c++'),
317 os.path.join(pdir, 'include', 'c++')) 323 os.path.join(pdir, 'include', 'c++'))
318 324
319 # Copy buildlog over. 325 # Copy buildlog over.
320 shutil.copy('buildlog.txt', pdir) 326 shutil.copy('buildlog.txt', pdir)
321 327
322 # Create archive. 328 # Create archive.
323 tar_entries = ['bin', 'lib', 'buildlog.txt'] 329 tar_entries = ['bin', 'lib', 'buildlog.txt']
(...skipping 28 matching lines...) Expand all
352 MaybeUpload(args, objdumpdir, platform) 358 MaybeUpload(args, objdumpdir, platform)
353 359
354 if sys.platform == 'win32' and args.upload: 360 if sys.platform == 'win32' and args.upload:
355 UploadPDBToSymbolServer() 361 UploadPDBToSymbolServer()
356 362
357 # FIXME: Warn if the file already exists on the server. 363 # FIXME: Warn if the file already exists on the server.
358 364
359 365
360 if __name__ == '__main__': 366 if __name__ == '__main__':
361 sys.exit(main()) 367 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/clang/scripts/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698