Commit 9f778117 authored by Amy Huang's avatar Amy Huang Committed by Commit Bot

clang build.py: set -DLLVM_ENABLE_DIA_SDK=OFF to use the native symbolizer,

and also remove DIA dependencies.

Setting DLLVM_ENABLE_DIA_SDK=OFF makes LLVM default to the native symbolizer,
which was recently implemented, and allows us to remove the DIA dependency.

There aren't many existing test cases for this, so at the moment it's possible
there are edge cases where the native symbolizer doesn't work.

Change-Id: I8ff395f47869296b01bc3c11f3afdeae102664d5
Bug: 1126219
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399515
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806243}
parent b531113a
...@@ -52,22 +52,12 @@ BUG_REPORT_URL = ('https://crbug.com and run' ...@@ -52,22 +52,12 @@ BUG_REPORT_URL = ('https://crbug.com and run'
win_sdk_dir = None win_sdk_dir = None
dia_dll = None
def GetWinSDKDir(): def GetWinSDKDir():
"""Get the location of the current SDK. Sets dia_dll as a side-effect.""" """Get the location of the current SDK."""
global win_sdk_dir global win_sdk_dir
global dia_dll
if win_sdk_dir: if win_sdk_dir:
return win_sdk_dir return win_sdk_dir
# Bump after VC updates.
DIA_DLL = {
'2013': 'msdia120.dll',
'2015': 'msdia140.dll',
'2017': 'msdia140.dll',
'2019': 'msdia140.dll',
}
# Don't let vs_toolchain overwrite our environment. # Don't let vs_toolchain overwrite our environment.
environ_bak = os.environ environ_bak = os.environ
...@@ -85,8 +75,6 @@ def GetWinSDKDir(): ...@@ -85,8 +75,6 @@ def GetWinSDKDir():
vs_path = os.environ['GYP_MSVS_OVERRIDE_PATH'] vs_path = os.environ['GYP_MSVS_OVERRIDE_PATH']
dia_path = os.path.join(vs_path, 'DIA SDK', 'bin', 'amd64') dia_path = os.path.join(vs_path, 'DIA SDK', 'bin', 'amd64')
dia_dll = os.path.join(dia_path, DIA_DLL[msvs_version])
os.environ = environ_bak os.environ = environ_bak
return win_sdk_dir return win_sdk_dir
...@@ -130,11 +118,6 @@ def CopyFile(src, dst): ...@@ -130,11 +118,6 @@ def CopyFile(src, dst):
shutil.copy(src, dst) shutil.copy(src, dst)
def CopyDiaDllTo(target_dir):
GetWinSDKDir()
CopyFile(dia_dll, target_dir)
def CopyDirectoryContents(src, dst): def CopyDirectoryContents(src, dst):
"""Copy the files from directory src to dst.""" """Copy the files from directory src to dst."""
dst = os.path.realpath(dst) # realpath() in case dst ends in /.. dst = os.path.realpath(dst) # realpath() in case dst ends in /..
...@@ -543,6 +526,8 @@ def main(): ...@@ -543,6 +526,8 @@ def main():
'-DLLVM_INCLUDE_GO_TESTS=OFF', '-DLLVM_INCLUDE_GO_TESTS=OFF',
# TODO(crbug.com/1113475): Update binutils. # TODO(crbug.com/1113475): Update binutils.
'-DENABLE_X86_RELAX_RELOCATIONS=NO', '-DENABLE_X86_RELAX_RELOCATIONS=NO',
# See crbug.com/1126219: Use native symbolizer instead of DIA
'-DLLVM_ENABLE_DIA_SDK=OFF',
] ]
if args.gcc_toolchain: if args.gcc_toolchain:
...@@ -661,8 +646,6 @@ def main(): ...@@ -661,8 +646,6 @@ def main():
if sys.platform == 'darwin': if sys.platform == 'darwin':
# TODO(crbug.com/731375): Run check-all on Darwin too. # TODO(crbug.com/731375): Run check-all on Darwin too.
test_targets = [ 'check-llvm', 'check-clang', 'check-builtins' ] test_targets = [ 'check-llvm', 'check-clang', 'check-builtins' ]
if sys.platform == 'win32':
CopyDiaDllTo(os.path.join(LLVM_BOOTSTRAP_DIR, 'bin'))
RunCommand(['ninja'] + test_targets, msvc_arch='x64') RunCommand(['ninja'] + test_targets, msvc_arch='x64')
RunCommand(['ninja', 'install'], msvc_arch='x64') RunCommand(['ninja', 'install'], msvc_arch='x64')
...@@ -1061,8 +1044,6 @@ def main(): ...@@ -1061,8 +1044,6 @@ def main():
RunCommand(['ninja', '-C', LLVM_BUILD_DIR, 'cr-check-all'], msvc_arch='x64') RunCommand(['ninja', '-C', LLVM_BUILD_DIR, 'cr-check-all'], msvc_arch='x64')
if args.run_tests: if args.run_tests:
if sys.platform == 'win32':
CopyDiaDllTo(os.path.join(LLVM_BUILD_DIR, 'bin'))
test_targets = [ 'check-all' ] test_targets = [ 'check-all' ]
if sys.platform == 'darwin': if sys.platform == 'darwin':
# TODO(thakis): Run check-all on Darwin too, https://crbug.com/959361 # TODO(thakis): Run check-all on Darwin too, https://crbug.com/959361
......
...@@ -39,7 +39,7 @@ import zipfile ...@@ -39,7 +39,7 @@ import zipfile
# Reverting problematic clang rolls is safe, though. # Reverting problematic clang rolls is safe, though.
# This is the output of `git describe` and is usable as a commit-ish. # This is the output of `git describe` and is usable as a commit-ish.
CLANG_REVISION = 'llvmorg-12-init-5035-gd0abc757' CLANG_REVISION = 'llvmorg-12-init-5035-gd0abc757'
CLANG_SUB_REVISION = 1 CLANG_SUB_REVISION = 2
PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION) PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
RELEASE_VERSION = '12.0.0' RELEASE_VERSION = '12.0.0'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment