Permalink
Browse files

Make gyp/win32 compatible with upstream ninja.

BUG=147451
Review URL: https://codereview.chromium.org/10907263

git-svn-id: http://gyp.googlecode.com/svn/trunk@1501 78cadc50-ecff-11dd-a971-7dbc132099af
  • Loading branch information...
1 parent 3bd630c commit f7bc250ccc4d619a1cf238db87e5979f89ff36d7 iannucci@chromium.org committed Sep 18, 2012
Showing with 8 additions and 20 deletions.
  1. +8 −10 pylib/gyp/generator/ninja.py
  2. +0 −10 pylib/gyp/win_tool.py
@@ -1421,48 +1421,46 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
'$cflags_pch_cc -c $in -o $out'),
depfile='$out.d')
else:
- # TODO(scottmg): Requires fork of ninja for dependency and linking
- # support: https://github.com/sgraham/ninja
# Template for compile commands mostly shared between compiling files
# and generating PCH. In the case of PCH, the "output" is specified by /Fp
# rather than /Fo (for object files), but we still need to specify an /Fo
# when compiling PCH.
- cc_template = ('ninja-deplist-helper -r . -q -f cl -o $out.dl -e $arch '
- '--command '
+ cc_template = ('ninja -t msvc -r . -o $out -e $arch '
+ '-- '
'$cc /nologo /showIncludes /FC '
'@$out.rsp '
'$cflags_pch_c /c $in %(outspec)s /Fd$pdbname ')
- cxx_template = ('ninja-deplist-helper -r . -q -f cl -o $out.dl -e $arch '
- '--command '
+ cxx_template = ('ninja -t msvc -r . -o $out -e $arch '
+ '-- '
'$cxx /nologo /showIncludes /FC '
'@$out.rsp '
'$cflags_pch_cc /c $in %(outspec)s $pchobj /Fd$pdbname ')
master_ninja.rule(
'cc',
description='CC $out',
command=cc_template % {'outspec': '/Fo$out'},
- depfile='$out.dl',
+ depfile='$out.d',
rspfile='$out.rsp',
rspfile_content='$defines $includes $cflags $cflags_c')
master_ninja.rule(
'cc_pch',
description='CC PCH $out',
command=cc_template % {'outspec': '/Fp$out /Fo$out.obj'},
- depfile='$out.dl',
+ depfile='$out.d',
rspfile='$out.rsp',
rspfile_content='$defines $includes $cflags $cflags_c')
master_ninja.rule(
'cxx',
description='CXX $out',
command=cxx_template % {'outspec': '/Fo$out'},
- depfile='$out.dl',
+ depfile='$out.d',
rspfile='$out.rsp',
rspfile_content='$defines $includes $cflags $cflags_cc')
master_ninja.rule(
'cxx_pch',
description='CXX PCH $out',
command=cxx_template % {'outspec': '/Fp$out /Fo$out.obj'},
- depfile='$out.dl',
+ depfile='$out.d',
rspfile='$out.rsp',
rspfile_content='$defines $includes $cflags $cflags_cc')
master_ninja.rule(
View
@@ -179,16 +179,6 @@ def ExecRcWrapper(self, arch, *args):
print line
return popen.returncode
- def ExecClWrapper(self, arch, depname, *args):
- """Runs cl.exe and filters output through ninja-deplist-helper to get
- dependendency information which is stored in |depname|."""
- env = self._GetEnv(arch)
- args = ' '.join(args) + \
- '| ninja-deplist-helper -r . -q -f cl -o ' + depname + '"'
- popen = subprocess.Popen(args, shell=True, env=env)
- popen.wait()
- return popen.returncode
-
def ExecActionWrapper(self, arch, rspfile, *dir):
"""Runs an action command line from a response file using the environment
for |arch|. If |dir| is supplied, use that as the working directory."""

0 comments on commit f7bc250

Please sign in to comment.