From 8c32f941ad6d9d29f7c4398011530afb9468a0aa Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 14 Oct 2020 22:16:46 -0400 Subject: [PATCH] Update clang. CopyDiaDllTo is no longer needed after https://chromium.googlesource.com/chromium/src/+/9f7781171ee82861d05eb653fb5ba3c54a11c1d8. As a bonus, this makes the script much easier to use outside of the bots. Change-Id: Ib59b7e6ff9276b860032134ad7eaa006492e76b9 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/43464 Reviewed-by: Adam Langley --- util/bot/update_clang.py | 45 +++------------------------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/util/bot/update_clang.py b/util/bot/update_clang.py index ceeb265ca..71c55db3a 100644 --- a/util/bot/update_clang.py +++ b/util/bot/update_clang.py @@ -19,12 +19,10 @@ import urllib2 # CLANG_REVISION and CLANG_SUB_REVISION determine the build of clang # to use. These should be synced with tools/clang/scripts/update.py in # Chromium. -CLANG_REVISION = '4e0d9925d6a3561449bdd8def27fd3f3f1b3fb9f' -CLANG_SVN_REVISION = 'n346557' -CLANG_SUB_REVISION = 1 +CLANG_REVISION = 'llvmorg-12-init-5627-gf086e85e' +CLANG_SUB_REVISION = 2 -PACKAGE_VERSION = '%s-%s-%s' % (CLANG_SVN_REVISION, CLANG_REVISION[:8], - CLANG_SUB_REVISION) +PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION) # Path constants. (All of these should be absolute paths.) THIS_DIR = os.path.abspath(os.path.dirname(__file__)) @@ -35,13 +33,6 @@ STAMP_FILE = os.path.join(LLVM_BUILD_DIR, 'cr_build_revision') CDS_URL = os.environ.get('CDS_CLANG_BUCKET_OVERRIDE', 'https://commondatastorage.googleapis.com/chromium-browser-clang') -# Bump after VC updates. -DIA_DLL = { - '2013': 'msdia120.dll', - '2015': 'msdia140.dll', - '2017': 'msdia140.dll', -} - def DownloadUrl(url, output_file): """Download url into output_file.""" @@ -133,34 +124,6 @@ def CopyFile(src, dst): shutil.copy(src, dst) -vs_version = None -def GetVSVersion(): - global vs_version - if vs_version: - return vs_version - - # Try using the toolchain in depot_tools. - # This sets environment variables used by SelectVisualStudioVersion below. - sys.path.append(THIS_DIR) - import vs_toolchain - vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() - - # Use gyp to find the MSVS installation, either in depot_tools as per above, - # or a system-wide installation otherwise. - sys.path.append(os.path.join(THIS_DIR, 'gyp', 'pylib')) - import gyp.MSVSVersion - vs_version = gyp.MSVSVersion.SelectVisualStudioVersion( - vs_toolchain.GetVisualStudioVersion()) - return vs_version - - -def CopyDiaDllTo(target_dir): - # This script always wants to use the 64-bit msdia*.dll. - dia_path = os.path.join(GetVSVersion().Path(), 'DIA SDK', 'bin', 'amd64') - dia_dll = os.path.join(dia_path, DIA_DLL[GetVSVersion().ShortName()]) - CopyFile(dia_dll, target_dir) - - def UpdateClang(): cds_file = "clang-%s.tgz" % PACKAGE_VERSION if sys.platform == 'win32' or sys.platform == 'cygwin': @@ -185,8 +148,6 @@ def UpdateClang(): try: DownloadAndUnpack(cds_full_url, LLVM_BUILD_DIR) print 'clang %s unpacked' % PACKAGE_VERSION - if sys.platform == 'win32': - CopyDiaDllTo(os.path.join(LLVM_BUILD_DIR, 'bin')) WriteStampFile(PACKAGE_VERSION) return 0 except urllib2.URLError: