| 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')
|
|
|
|
|