Lines Matching +full:clang +full:- +full:ubsan
3 # Use of this source code is governed by a BSD-style license that can be
6 """This script will check out llvm and clang, and then package the results up
24 LLVM_BOOTSTRAP_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-bootstrap')
26 'llvm-bootstrap-install')
27 LLVM_BUILD_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-build')
29 EU_STRIP = os.path.join(THIRD_PARTY_DIR, 'eu-strip', 'bin', 'eu-strip')
65 '--print-revision']
78 'http://dev.chromium.org/developers/how-tos/install-depot-tools'
90 gsutil_args = ['-q', 'stat',
91 'gs://chromium-browser-clang-staging/%s/%s.tgz' %
97 gsutil_args = ['cp', '-a', 'public-read',
99 'gs://chromium-browser-clang-staging/%s/%s.tgz' %
115 # chromium-browser-symsrv bucket, since chrome devs have that in their
119 # chromium-browser-symsrv/clang-cl.exe/ABCDEFAB01234/clang-cl.ex_
125 # gs://chromium-browser-symsrv/clang-cl.exe.pdb/AABBCCDD/clang-cl.dll.pd_
133 binaries = [ 'bin/clang-cl.exe', 'bin/lld-link.exe' ]
139 # The build process builds clang.exe and then copies it to clang-cl.exe
141 # filename is). Hence, the pdb is at clang.pdb, not at clang-cl.pdb.
142 # Likewise, lld-link.exe's PDB file is called lld.pdb.
149 f_cab = f[:-1] + '_'
153 gsutil_args = ['cp', '-n', '-a', 'public-read', f_cab,
154 'gs://chromium-browser-symsrv/' + dest]
162 parser = argparse.ArgumentParser(description='build and package clang')
163 parser.add_argument('--upload', action='store_true',
170 print ("--upload and LLVM_FORCE_HEAD_REVISION could not be used "
175 pdir = 'clang-' + expected_stamp
189 Tee('Diff in llvm/tools/clang:\n', log)
190 TeeCmd(['svn', 'stat', os.path.join(LLVM_DIR, 'tools', 'clang')],
192 TeeCmd(['svn', 'diff', os.path.join(LLVM_DIR, 'tools', 'clang')],
194 # TODO(thakis): compiler-rt is in projects/compiler-rt on Windows but
195 # llvm/compiler-rt elsewhere. So this diff call is currently only right on
197 Tee('Diff in llvm/compiler-rt:\n', log)
198 TeeCmd(['svn', 'stat', os.path.join(LLVM_DIR, 'projects', 'compiler-rt')],
200 TeeCmd(['svn', 'diff', os.path.join(LLVM_DIR, 'projects', 'compiler-rt')],
217 opt_flags += ['--lto-lld']
219 '--bootstrap', '--force-local-build',
220 '--run-tests'] + opt_flags
233 want = ['bin/llvm-pdbutil' + exe_ext,
234 'bin/llvm-symbolizer' + exe_ext,
235 'bin/llvm-undname' + exe_ext,
237 # Copy built-in headers (lib/clang/3.x.y/include).
238 'lib/clang/*/include/*',
239 'lib/clang/*/share/asan_blacklist.txt',
240 'lib/clang/*/share/cfi_blacklist.txt',
243 want.append('bin/clang-cl.exe')
244 want.append('bin/lld-link.exe')
247 want.extend(['bin/clang',
254 'lib/clang/*/lib/darwin/*asan_osx*',
255 'lib/clang/*/lib/darwin/*asan_iossim*',
256 'lib/clang/*/lib/darwin/*fuzzer*',
257 'lib/clang/*/lib/darwin/*profile_osx*',
258 'lib/clang/*/lib/darwin/*profile_iossim*',
261 'lib/clang/*/lib/darwin/*.ios.a',
262 'lib/clang/*/lib/darwin/*.osx.a',
265 # Add llvm-ar and lld for LTO.
266 want.append('bin/llvm-ar')
269 # lib/clang/*/lib/linux/libclang_rt.{[atm]san,san,ubsan,fuzzer,profile}-*.a,
271 want.extend(['lib/clang/*/lib/linux/*[atm]san*',
272 'lib/clang/*/lib/linux/*ubsan*',
273 'lib/clang/*/lib/linux/*libclang_rt.fuzzer*',
274 'lib/clang/*/lib/linux/*libclang_rt.san*',
275 'lib/clang/*/lib/linux/*profile*',
276 'lib/clang/*/share/msan_blacklist.txt',
279 want.extend(['lib/clang/*/lib/windows/clang_rt.asan*.dll',
280 'lib/clang/*/lib/windows/clang_rt.asan*.lib',
281 'lib/clang/*/lib/windows/clang_rt.profile*.lib',
282 'lib/clang/*/lib/windows/clang_rt.ubsan*.lib',
286 # root: third_party/llvm-build/Release+Asserts/lib/..., rel_root: lib/...
300 subprocess.call(['strip', '-x', dest])
303 subprocess.call([EU_STRIP, '-g', dest])
305 stripped_binaries = ['clang',
306 'llvm-pdbutil',
307 'llvm-symbolizer',
308 'llvm-undname',
313 stripped_binaries.append('llvm-ar')
317 subprocess.call(['strip', '-x', os.path.join(pdir, 'bin', f)])
323 os.symlink('clang', os.path.join(pdir, 'bin', 'clang++'))
324 os.symlink('clang', os.path.join(pdir, 'bin', 'clang-cl'))
328 os.symlink('lld', os.path.join(pdir, 'bin', 'lld-link'))
348 # Zip up llvm-code-coverage for code coverage.
349 code_coverage_dir = 'llvm-code-coverage-' + stamp
352 for filename in ['llvm-cov', 'llvm-profdata']:
360 # Zip up llvm-objdump and related tools for sanitizer coverage and Supersize.
361 objdumpdir = 'llvmobjdump-' + stamp
364 for filename in ['llvm-bcanalyzer', 'llvm-cxxfilt', 'llvm-nm', 'llvm-objdump',
365 'llvm-readobj']:
374 os.symlink('llvm-readobj', os.path.join(objdumpdir, 'bin', 'llvm-readelf'))
382 # Zip up llvm-cfi-verify for CFI coverage.
383 cfiverifydir = 'llvmcfiverify-' + stamp
386 shutil.copy(os.path.join(LLVM_RELEASE_DIR, 'bin', 'llvm-cfi-verify' +
395 safestackdir = 'safestack-' + stamp
398 for build in glob.glob(os.path.join(LLVM_RELEASE_DIR, 'lib', 'clang', '*')):
400 dest_dir = os.path.join(safestackdir, 'lib', 'clang', version,
413 llddir = 'lld-' + stamp
418 os.symlink('lld', os.path.join(llddir, 'bin', 'lld-link'))
426 translation_unit_dir = 'translation_unit-' + stamp