Index: content/browser/tracing/tracing_resources.gyp |
diff --git a/content/browser/tracing/tracing_resources.gyp b/content/browser/tracing/tracing_resources.gyp |
index 1efc0ad72c62c46716bb549f3a4fa3df7642c7ad..fcd132fadd4d85971a204d0b67e513c9803680d7 100644 |
--- a/content/browser/tracing/tracing_resources.gyp |
+++ b/content/browser/tracing/tracing_resources.gyp |
@@ -58,6 +58,21 @@ |
'grit_cmd': ['python', '../../../tools/grit/grit.py'], |
'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd', |
'grit_rc_header_format%': '', |
+ |
+ 'conditions': [ |
+ # These scripts can skip writing generated files if they are |
+ # identical to the already existing files, which avoids further |
+ # build steps, like recompilation. However, a dependency (earlier |
+ # build step) having a newer timestamp than an output (later |
+ # build step) confuses some build systems, so only use this on |
+ # ninja, which explicitly supports this use case (gyp turns all |
+ # actions into ninja restat rules). |
+ ['"<(GENERATOR)"=="ninja"', { |
+ 'write_only_new': '1', |
+ }, { |
+ 'write_only_new': '0', |
+ }], |
+ ], |
}, |
'inputs': [ |
'<(grit_grd_file)', |
@@ -71,6 +86,7 @@ |
'-i', '<(grit_grd_file)', 'build', |
'-f', '<(DEPTH)/tools/gritsettings/resource_ids', |
'-o', '<(grit_out_dir)', |
+ '--write-only-new=<(write_only_new)', |
'-D', 'SHARED_INTERMEDIATE_DIR=<(SHARED_INTERMEDIATE_DIR)', |
'<@(grit_defines)', |
'<@(grit_rc_header_format)'], |