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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import glob 6 import glob
7 import json 7 import json
8 import os 8 import os
9 import pipes 9 import pipes
10 import platform 10 import platform
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 vs_runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() 299 vs_runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs()
300 if not vs_runtime_dll_dirs: 300 if not vs_runtime_dll_dirs:
301 return 301 return
302 302
303 x64_runtime, x86_runtime = vs_runtime_dll_dirs 303 x64_runtime, x86_runtime = vs_runtime_dll_dirs
304 runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime 304 runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime
305 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False) 305 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False)
306 if configuration == 'Debug': 306 if configuration == 'Debug':
307 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) 307 _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True)
308 308
309 _CopyDebugger(target_dir, target_cpu)
310
311
312 def _CopyDebugger(target_dir, target_cpu):
313 """Copy dbghelp.dll into the requested directory as needed.
314
315 target_cpu is one of 'x86' or 'x64'.
316
317 dbghelp.dll is used when Chrome needs to symbolize stacks. Copying this file
318 from the SDK directory avoids using the system copy of dbghelp.dll which then
319 ensures compatibility with recent debug information formats, such as VS
320 2017 /debug:fastlink PDBs.
321 """
322 win_sdk_dir = SetEnvironmentAndGetSDKDir()
323 if not win_sdk_dir:
324 return
325
326 debug_file = 'dbghelp.dll'
327 full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file)
328 target_path = os.path.join(target_dir, debug_file)
329 _CopyRuntimeImpl(target_path, full_path)
330
309 331
310 def _GetDesiredVsToolchainHashes(): 332 def _GetDesiredVsToolchainHashes():
311 """Load a list of SHA1s corresponding to the toolchains that we want installed 333 """Load a list of SHA1s corresponding to the toolchains that we want installed
312 to build with.""" 334 to build with."""
313 env_version = GetVisualStudioVersion() 335 env_version = GetVisualStudioVersion()
314 if env_version == '2015': 336 if env_version == '2015':
315 # Update 3 final with patches with 10.0.14393.0 SDK. 337 # Update 3 final with patches with 10.0.14393.0 SDK.
316 return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616'] 338 return ['d3cb0e37bdd120ad0ac4650b674b09e81be45616']
317 if env_version == '2017': 339 if env_version == '2017':
318 # VS 2017 RTM with 10.0.14393.0 SDK and dbghelp.dll fixes. 340 # VS 2017 RTM with 10.0.14393.0 SDK and dbghelp.dll fixes.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 'copy_dlls': CopyDlls, 435 'copy_dlls': CopyDlls,
414 } 436 }
415 if len(sys.argv) < 2 or sys.argv[1] not in commands: 437 if len(sys.argv) < 2 or sys.argv[1] not in commands:
416 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) 438 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands)
417 return 1 439 return 1
418 return commands[sys.argv[1]](*sys.argv[2:]) 440 return commands[sys.argv[1]](*sys.argv[2:])
419 441
420 442
421 if __name__ == '__main__': 443 if __name__ == '__main__':
422 sys.exit(main()) 444 sys.exit(main())
OLDNEW
« 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