Chromium Code Reviews| Index: pylib/gyp/generator/ninja.py |
| diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py |
| index 1d21d4db8308ce69e19a49a75020badc0614f4fd..96d260a01ef41b31a43857ca0cdd6f60597d0ada 100644 |
| --- a/pylib/gyp/generator/ninja.py |
| +++ b/pylib/gyp/generator/ninja.py |
| @@ -814,15 +814,17 @@ class NinjaWriter: |
| cflags_c = self.msvs_settings.GetCflagsC(config_name) |
| cflags_cc = self.msvs_settings.GetCflagsCC(config_name) |
| extra_defines = self.msvs_settings.GetComputedDefines(config_name) |
| - pdbpath = self.msvs_settings.GetCompilerPdbName( |
| + pdbpath_c = pdbpath_cc = self.msvs_settings.GetCompilerPdbName( |
|
Nico
2013/11/27 00:13:19
Comment why there are two pdbs (link to review com
|
| config_name, self.ExpandSpecial) |
| - if not pdbpath: |
| + if not pdbpath_c: |
| obj = 'obj' |
| if self.toolset != 'target': |
| obj += '.' + self.toolset |
| - pdbpath = os.path.normpath(os.path.join(obj, self.base_dir, |
| - self.name + '.pdb')) |
| - self.WriteVariableList(ninja_file, 'pdbname', [pdbpath]) |
| + pdbpath = os.path.normpath(os.path.join(obj, self.base_dir, self.name)) |
| + pdbpath_c = pdbpath + '.c.pdb' |
| + pdbpath_cc = pdbpath + '.cc.pdb' |
| + self.WriteVariableList(ninja_file, 'pdbname_c', [pdbpath_c]) |
| + self.WriteVariableList(ninja_file, 'pdbname_cc', [pdbpath_cc]) |
| self.WriteVariableList(ninja_file, 'pchprefix', [self.name]) |
| else: |
| cflags = config.get('cflags', []) |
| @@ -1797,14 +1799,20 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, |
| depfile='$out.d', |
| deps=deps) |
| else: |
| + # TODO(scottmg) Separate pdb names is a test to see if it works around |
| + # http://crbug.com/142362. It seems there's a race between the creation of |
| + # the .pdb by the precompiled header step for .cc and the compilation of |
| + # .c files. This should be handled by mspdbsrv, but rarely errors out with |
| + # c1xx : fatal error C1033: cannot open program database |
| + # By making the rules target separate pdb files this might be avoided. |
|
Nico
2013/11/27 00:13:19
Oh, here it is. The just a comment saying "# See c
scottmg
2013/11/27 00:32:31
Done.
|
| cc_command = ('ninja -t msvc -e $arch ' + |
| '-- ' |
| '$cc /nologo /showIncludes /FC ' |
| - '@$out.rsp /c $in /Fo$out /Fd$pdbname ') |
| + '@$out.rsp /c $in /Fo$out /Fd$pdbname_c ') |
| cxx_command = ('ninja -t msvc -e $arch ' + |
| '-- ' |
| '$cxx /nologo /showIncludes /FC ' |
| - '@$out.rsp /c $in /Fo$out /Fd$pdbname ') |
| + '@$out.rsp /c $in /Fo$out /Fd$pdbname_cc ') |
| master_ninja.rule( |
| 'cc', |
| description='CC $out', |