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

Unified Diff: pylib/gyp/generator/ninja.py

Issue 11186038: Don't try to use -MMD / .o.d depfiles for ninja with .s files. (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: Give win32/64 a free pass. Created 8 years, 2 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
Index: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 49be332365bc77a25299b3fedab18167212c4d18..177eec3f77be5ec5d88f94d2aa2b64c41ff26225 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -782,8 +782,10 @@ class NinjaWriter:
obj_ext = self.obj_ext
if ext in ('cc', 'cpp', 'cxx'):
command = 'cxx'
- elif ext == 'c' or (ext in ('s', 'S') and self.flavor != 'win'):
+ elif ext == 'c' or (ext == 'S' and self.flavor != 'win'):
command = 'cc'
+ elif ext == 's' and self.flavor != 'win': # Doesn't generate .o.d files.
+ command = 'cc_s'
elif (self.flavor == 'win' and ext == 'asm' and
self.msvs_settings.GetTargetPlatform(config_name) == 'Win32'):
# Asm files only get auto assembled for x86 (not x64).
@@ -1431,6 +1433,11 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
'$cflags_pch_c -c $in -o $out'),
depfile='$out.d')
master_ninja.rule(
+ 'cc_s',
+ description='CC $out',
+ command=('$cc $defines $includes $cflags $cflags_c '
+ '$cflags_pch_c -c $in -o $out'))
+ master_ninja.rule(
'cxx',
description='CXX $out',
command=('$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc '

Powered by Google App Engine
This is Rietveld 408576698