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

Unified Diff: pylib/gyp/msvs_emulation.py

Issue 126443004: win ninja: include .pdb in linker outputs (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: update comment Created 6 years, 11 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 | « pylib/gyp/generator/ninja.py ('k') | test/win/gyptest-link-pdb.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/msvs_emulation.py
diff --git a/pylib/gyp/msvs_emulation.py b/pylib/gyp/msvs_emulation.py
index 3435bbc524e64a8a70c913ecd2fd40314d0a1408..6428fced00552e07ffa271dd0509047308d0cf79 100644
--- a/pylib/gyp/msvs_emulation.py
+++ b/pylib/gyp/msvs_emulation.py
@@ -317,15 +317,20 @@ class MsvsSettings(object):
output_file, config=config))
return output_file
- def GetPDBName(self, config, expand_special):
- """Gets the explicitly overridden pdb name for a target or returns None
- if it's not overridden."""
+ def GetPDBName(self, config, expand_special, default):
+ """Gets the explicitly overridden pdb name for a target or returns
+ default if it's not overridden, or if no pdb will be generated."""
config = self._TargetConfig(config)
output_file = self._Setting(('VCLinkerTool', 'ProgramDatabaseFile'), config)
- if output_file:
- output_file = expand_special(self.ConvertVSMacros(
- output_file, config=config))
- return output_file
+ generate_debug_info = self._Setting(
+ ('VCLinkerTool', 'GenerateDebugInformation'), config)
+ if generate_debug_info:
+ if output_file:
+ return expand_special(self.ConvertVSMacros(output_file, config=config))
+ else:
+ return default
+ else:
+ return None
def GetCflags(self, config):
"""Returns the flags that need to be added to .c and .cc compilations."""
@@ -454,7 +459,7 @@ class MsvsSettings(object):
return output_file
def GetLdflags(self, config, gyp_to_build_path, expand_special,
- manifest_base_name, is_executable, build_dir):
+ manifest_base_name, output_name, is_executable, build_dir):
"""Returns the flags that need to be added to link commands, and the
manifest files."""
config = self._TargetConfig(config)
@@ -472,7 +477,7 @@ class MsvsSettings(object):
out = self.GetOutputName(config, expand_special)
if out:
ldflags.append('/OUT:' + out)
- pdb = self.GetPDBName(config, expand_special)
+ pdb = self.GetPDBName(config, expand_special, output_name + '.pdb')
if pdb:
ldflags.append('/PDB:' + pdb)
pgd = self.GetPGDName(config, expand_special)
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/win/gyptest-link-pdb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698