Index: build/vs_toolchain.py |
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py |
index aa56a79b8adc76dced28026663a5bf1610c34b67..9d8f49a5c8abc7760add685eb1626eaeedfaade0 100755 |
--- a/build/vs_toolchain.py |
+++ b/build/vs_toolchain.py |
@@ -315,6 +315,21 @@ def CopyDlls(target_dir, configuration, target_cpu): |
_CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True) |
+def CopyDebugger(target_dir, target_cpu): |
+ """Copy cdb.exe into the requested directory as needed. |
+ |
+ target_cpu is one of 'x86' or 'x64'. |
+ |
+ This is used for the GN build. |
+ """ |
+ win_sdk_dir = SetEnvironmentAndGetSDKDir() |
+ if not win_sdk_dir: |
+ return |
+ |
+ cdb_exe = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, 'cdb.exe') |
+ _CopyRuntimeImpl(os.path.join(target_dir, 'cdb.exe'), cdb_exe) |
scottmg
2017/02/10 15:52:32
I don't think this will run isolated without some
jochen (gone - plz use gerrit)
2017/02/10 15:56:39
Is there some kind of ldd equivalent that lists al
|
+ |
+ |
def _GetDesiredVsToolchainHashes(): |
"""Load a list of SHA1s corresponding to the toolchains that we want installed |
to build with.""" |
@@ -378,8 +393,8 @@ def NormalizePath(path): |
return path |
-def GetToolchainDir(): |
- """Gets location information about the current toolchain (must have been |
+def SetEnvironmentAndGetSDKDir(): |
+ """Gets location information about the current sdk (must have been |
previously updated by 'update'). This is used for the GN build.""" |
runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() |
@@ -389,6 +404,15 @@ def GetToolchainDir(): |
if os.path.isdir(default_sdk_path): |
os.environ['WINDOWSSDKDIR'] = default_sdk_path |
+ return NormalizePath(os.environ['WINDOWSSDKDIR']) |
+ |
+ |
+def GetToolchainDir(): |
+ """Gets location information about the current toolchain (must have been |
+ previously updated by 'update'). This is used for the GN build.""" |
+ runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs() |
+ win_sdk_dir = SetEnvironmentAndGetSDKDir() |
+ |
print '''vs_path = "%s" |
sdk_path = "%s" |
vs_version = "%s" |
@@ -396,7 +420,7 @@ wdk_dir = "%s" |
runtime_dirs = "%s" |
''' % ( |
NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH']), |
- NormalizePath(os.environ['WINDOWSSDKDIR']), |
+ win_sdk_dir, |
GetVisualStudioVersion(), |
NormalizePath(os.environ.get('WDK_DIR', '')), |
os.path.pathsep.join(runtime_dll_dirs or ['None'])) |
@@ -407,6 +431,7 @@ def main(): |
'update': Update, |
'get_toolchain_dir': GetToolchainDir, |
'copy_dlls': CopyDlls, |
+ 'copy_debugger': CopyDebugger, |
} |
if len(sys.argv) < 2 or sys.argv[1] not in commands: |
print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |