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

Unified Diff: build/vs_toolchain.py

Issue 2834513003: Copy dbghelp.dll to output directory (Closed)
Patch Set: Created 3 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: build/vs_toolchain.py
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
index 82ebedc99dfcdba8a2eb067cd3120bc3b091db59..8c7d6b99b01a04d787715fea12fca6fa42d118e1 100755
--- a/build/vs_toolchain.py
+++ b/build/vs_toolchain.py
@@ -306,6 +306,28 @@ def CopyDlls(target_dir, configuration, target_cpu):
if configuration == 'Debug':
_CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True)
+ _CopyDebugger(target_dir, target_cpu)
+
+
+def _CopyDebugger(target_dir, target_cpu):
+ """Copy dbghelp.dll into the requested directory as needed.
+
+ target_cpu is one of 'x86' or 'x64'.
+
+ dbghelp.dll is used when Chrome needs to symbolize stacks. Copying this file
+ from the SDK directory avoids using the system copy of dbghelp.dll which then
+ ensures compatibility with recent debug information formats, such as VS
+ 2017 /debug:fastlink PDBs.
+ """
+ win_sdk_dir = SetEnvironmentAndGetSDKDir()
+ if not win_sdk_dir:
+ return
+
+ debug_file = 'dbghelp.dll'
+ full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file)
+ target_path = os.path.join(target_dir, debug_file)
+ _CopyRuntimeImpl(target_path, full_path)
+
def _GetDesiredVsToolchainHashes():
"""Load a list of SHA1s corresponding to the toolchains that we want installed
« 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