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

Unified Diff: content/browser/devtools/devtools_resources.gyp

Issue 740463005: grit: Use new --write-only-new flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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
« no previous file with comments | « build/secondary/tools/grit/grit_rule.gni ('k') | content/browser/tracing/tracing_resources.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/devtools_resources.gyp
diff --git a/content/browser/devtools/devtools_resources.gyp b/content/browser/devtools/devtools_resources.gyp
index 3b82cc36a39920e6f33952557910cb7af9548a99..e246e2292930969c466a9aa5b425de5566732778 100644
--- a/content/browser/devtools/devtools_resources.gyp
+++ b/content/browser/devtools/devtools_resources.gyp
@@ -23,6 +23,21 @@
'grit_cmd': ['python', '../../../tools/grit/grit.py'],
'grit_grd_file': '<(SHARED_INTERMEDIATE_DIR)/devtools/devtools_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)',
@@ -38,6 +53,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)'],
« no previous file with comments | « build/secondary/tools/grit/grit_rule.gni ('k') | content/browser/tracing/tracing_resources.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698