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

Unified Diff: tools/clang/scripts/update.py

Issue 1879753002: clang update.py: When running tests on Windows, make sure DIA works. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.py
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 0abb42af0586bd7085e805720d9d15c2fec5a2c2..dc54f511f8f94edc865cb312e03c3ba09a5c620d 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -220,8 +220,8 @@ def RunCommand(command, msvc_arch=None, env=None, fail_hard=True):
def CopyFile(src, dst):
"""Copy a file from src to dst."""
- shutil.copy(src, dst)
print "Copying %s to %s" % (src, dst)
+ shutil.copy(src, dst)
def CopyDirectoryContents(src, dst, filename_filter=None):
@@ -351,6 +351,13 @@ def GetVSVersion():
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, 'msdia140.dll') # Bump after VC updates.
+ CopyFile(dia_dll, target_dir)
+
+
def UpdateClang(args):
print 'Updating Clang to %s...' % PACKAGE_VERSION
@@ -384,6 +391,8 @@ def UpdateClang(args):
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'))
# Download the gold plugin if requested to by an environment variable.
# This is used by the CFI ClusterFuzz bot, and it's required for official
# builds on linux.
@@ -476,6 +485,8 @@ def UpdateClang(args):
RunCommand(['cmake'] + bootstrap_args + [LLVM_DIR], msvc_arch='x64')
RunCommand(['ninja'], msvc_arch='x64')
if args.run_tests:
+ if sys.platform == 'win32':
+ CopyDiaDllTo(os.path.join(LLVM_BOOTSTRAP_DIR, 'bin'))
RunCommand(['ninja', 'check-all'], msvc_arch='x64')
RunCommand(['ninja', 'install'], msvc_arch='x64')
if args.gcc_toolchain:
@@ -760,6 +771,8 @@ def UpdateClang(args):
os.chdir(LLVM_BUILD_DIR)
RunCommand(['ninja', 'cr-check-all'], msvc_arch='x64')
if args.run_tests:
+ if sys.platform == 'win32':
+ CopyDiaDllTo(os.path.join(LLVM_BUILD_DIR, 'bin'))
os.chdir(LLVM_BUILD_DIR)
RunCommand(['ninja', 'check-all'], msvc_arch='x64')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698