Lines Matching full:clang
6 """This script is used to download prebuilt clang binaries.
8 It is also used by package.py to build the prebuilt clang binaries."""
29 # Reverting problematic clang rolls is safe, though.
36 # This is incremented when pushing a new build of Clang at the same revision.
54 CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang')
80 'https://commondatastorage.googleapis.com/chromium-browser-clang')
271 Several Chrome tools have dependencies on LLVM/Clang libraries. The LLVM build
280 f.write('# Automatically generated by tools/clang/scripts/update.py. ' +
282 f.write('# Since tools/clang is located in another directory, use the \n')
380 """Checks that `clang --version` outputs VERSION. If this fails, VERSION
383 clang = os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')
385 # TODO: Parse `clang-cl /?` output for built clang's version and check that
386 # to check the binary we're actually shipping? But clang-cl.exe is just
387 # a copy of clang.exe, so this does check the same thing.
388 clang += '.exe'
389 version_out = subprocess.check_output([clang, '--version'])
390 version_out = re.match(r'clang version ([0-9.]+)', version_out).group(1)
392 print ('unexpected clang version %s (not %s), update VERSION in update.py'
398 print 'Updating Clang to %s...' % PACKAGE_VERSION
405 print 'Clang is already up to date.'
414 cds_file = "clang-%s.tgz" % PACKAGE_VERSION
423 print 'Downloading prebuilt clang'
428 print 'clang %s unpacked' % PACKAGE_VERSION
439 print 'Failed to download prebuilt clang %s' % cds_file
446 print 'The Android NDK is needed to build a Clang whose -fsanitize=address'
460 Checkout('Clang', LLVM_REPO_URL + '/cfe/trunk', CLANG_DIR)
469 # clang needs a libc++ checkout, else -stdlib=libc++ won't find includes
537 cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang-cl.exe')
538 cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang-cl.exe')
544 cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang')
545 cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++')
596 # needed, on OS X it requires libc++. clang only automatically links to libc++
597 # when targeting OS X 10.9+, so add stdlib=libc++ explicitly so clang can run
603 # Xcode's clang automatically sets a sysroot, self-built clangs don't.
614 # Build clang.
631 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698)
647 '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'),
657 # Copy in the right stdlibc++.so.6 so clang can start.
672 RunCommand(['strip', '-x', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
674 RunCommand(['strip', os.path.join(LLVM_BUILD_DIR, 'bin', 'clang')])
687 # TODO(thakis): Add this once compiler-rt can build with clang-cl (see
724 asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang',
726 asan_rt_lib_dst_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
736 os.path.join(LLVM_BUILD_DIR, 'lib/clang', VERSION, 'include/sanitizer'))
744 # name either in our build system, or in Clang. See also
753 sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
755 aux_sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
796 '-DCMAKE_C_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang'),
797 '-DCMAKE_CXX_COMPILER=' + os.path.join(LLVM_BUILD_DIR, 'bin/clang++'),
823 print 'Clang update was successful.'
828 parser = argparse.ArgumentParser(description='Build Clang.')
830 help='first build clang with CC, then with itself.')
832 help="run only if the script thinks clang is needed")
844 help='print current clang revision and exit.')
845 parser.add_argument('--print-clang-version', action='store_true',
846 help='print current clang version (e.g. x.y.z) and exit.')
866 # clang is always used on Mac and Linux.
869 # clang requested via $GYP_DEFINES.
870 if re.search(r'\b(clang|asan|lsan|msan|tsan)=1',
873 # clang previously downloaded, keep it up to date.
880 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).'