diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py index f612e6c..c3d36eb0 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py
@@ -27,7 +27,7 @@ # Do NOT CHANGE this if you don't know what you're doing -- see # https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md # Reverting problematic clang rolls is safe, though. -CLANG_REVISION = '346388' +CLANG_REVISION = '350768' use_head_revision = bool(os.environ.get('LLVM_FORCE_HEAD_REVISION', '0') in ('1', 'YES')) @@ -35,7 +35,7 @@ CLANG_REVISION = 'HEAD' # This is incremented when pushing a new build of Clang at the same revision. -CLANG_SUB_REVISION=5 +CLANG_SUB_REVISION=1 PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION) @@ -347,7 +347,7 @@ return gnuwin_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'gnuwin') - GNUWIN_VERSION = '8' + GNUWIN_VERSION = '9' GNUWIN_STAMP = os.path.join(gnuwin_dir, 'stamp') if ReadStampFile(GNUWIN_STAMP) == GNUWIN_VERSION: print 'GNU Win tools already up to date.' @@ -384,6 +384,7 @@ '2013': 'msdia120.dll', '2015': 'msdia140.dll', '2017': 'msdia140.dll', + '2019': 'msdia140.dll', } # Don't let vs_toolchain overwrite our environment. @@ -531,6 +532,7 @@ '-DLLVM_ENABLE_TERMINFO=OFF', # Statically link MSVCRT to avoid DLL dependencies. '-DLLVM_USE_CRT_RELEASE=MT', + '-DCLANG_PLUGIN_SUPPORT=OFF', ] if sys.platform != 'win32': @@ -828,25 +830,20 @@ '-DANDROID=1'] RmCmakeCache('.') RunCommand(['cmake'] + android_args + [COMPILER_RT_DIR]) - RunCommand(['ninja', 'asan', 'ubsan', 'profile']) + + # We use ASan i686 build for fuzzing. + libs_want = ['lib/linux/libclang_rt.asan-{0}-android.so'] + if target_arch in ['aarch64', 'arm']: + libs_want += [ + 'lib/linux/libclang_rt.ubsan_standalone-{0}-android.so', + 'lib/linux/libclang_rt.profile-{0}-android.a', + ] + libs_want = [lib.format(target_arch) for lib in libs_want] + RunCommand(['ninja'] + libs_want) # And copy them into the main build tree. - asan_lib_path_format = 'lib/linux/libclang_rt.asan-{0}-android.so' - libs_want = [ - asan_lib_path_format, - 'lib/linux/libclang_rt.ubsan_standalone-{0}-android.so', - 'lib/linux/libclang_rt.profile-{0}-android.a', - ] - for arch in ['aarch64', 'arm']: - for p in libs_want: - lib_path = os.path.join(build_dir, p.format(arch)) - if os.path.exists(lib_path): - shutil.copy(lib_path, rt_lib_dst_dir) - - # We also use ASan i686 build for fuzzing. - lib_path = os.path.join(build_dir, asan_lib_path_format.format('i686')) - if os.path.exists(lib_path): - shutil.copy(lib_path, rt_lib_dst_dir) + for p in libs_want: + shutil.copy(p, rt_lib_dst_dir) if args.with_fuchsia: # Fuchsia links against libclang_rt.builtins-<arch>.a instead of libgcc.a. @@ -927,9 +924,6 @@ parser = argparse.ArgumentParser(description='Build Clang.') parser.add_argument('--bootstrap', action='store_true', help='first build clang with CC, then with itself.') - # TODO(phajdan.jr): remove --if-needed after fixing callers. It's no-op. - parser.add_argument('--if-needed', action='store_true', - help="run only if the script thinks clang is needed") parser.add_argument('--force-local-build', action='store_true', help="don't try to download prebuild binaries") parser.add_argument('--gcc-toolchain', help='set the version for which gcc '