| 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)
|
|
|