Index: tools/clang/scripts/update.py |
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py |
index 0abb42af0586bd7085e805720d9d15c2fec5a2c2..e5b75942e56e04099a681dfee1926bfcfa051265 100755 |
--- a/tools/clang/scripts/update.py |
+++ b/tools/clang/scripts/update.py |
@@ -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') |