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

Unified Diff: build/secondary/tools/grit/grit_rule.gni

Issue 1145243006: Port chromevox build to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@externs
Patch Set: Workaround hardlink related spuroius rebuild issue by using a stamp file (not ideal). Created 5 years, 5 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
« no previous file with comments | « .gn ('k') | chrome/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/secondary/tools/grit/grit_rule.gni
diff --git a/build/secondary/tools/grit/grit_rule.gni b/build/secondary/tools/grit/grit_rule.gni
index 95a5e2e1332705ae8ad358d69cd26ee60c595ad4..bdf812f219dee3a74037fb4d1aa9c1bc2e08ec13 100644
--- a/build/secondary/tools/grit/grit_rule.gni
+++ b/build/secondary/tools/grit/grit_rule.gni
@@ -11,11 +11,10 @@
# Path to .grd file.
#
# outputs (required)
-# List of outputs from grit, relative to the target_gen_dir. If supplied,
-# a call to Grit to compute the outputs can be skipped which will make
-# GN run faster. Grit will verify at build time that this list is correct
-# and will fail if there is a mismatch between the outputs specified by
-# the .grd file and the outputs list here.
+# List of outputs from grit, relative to the target_gen_dir. Grit will
+# verify at build time that this list is correct and will fail if there
+# is a mismatch between the outputs specified by the .grd file and the
+# outputs list here.
#
# To get this list, you can look in the .grd file for
# <output filename="..." and put those filename here. The base directory
@@ -50,6 +49,10 @@
# output_dir, but if multiple targets with the same name end up in
# the same output_dir, they can collide.
#
+# depfile_dir (optional)
+# If set, used to store the depfile and corresponding stamp file.
+# Defaults to output_dir
+#
# use_qualified_include (optional)
# If set, output_dir is not added to include_dirs.
#
@@ -331,6 +334,12 @@ template("grit") {
grit_output_name = target_name
}
+ if (defined(invoker.depfile_dir)) {
+ depfile_dir = invoker.depfile_dir
+ } else {
+ depfile_dir = output_dir
+ }
+
# These are all passed as arguments to the script so have to be relative to
# the build directory.
if (resource_ids != "") {
@@ -383,7 +392,7 @@ template("grit") {
script = "//tools/grit/grit.py"
inputs = grit_inputs
- depfile = "$output_dir/${grit_output_name}_stamp.d"
+ depfile = "$depfile_dir/${grit_output_name}_stamp.d"
outputs = [ "${depfile}.stamp" ] + grit_outputs
args = [
« no previous file with comments | « .gn ('k') | chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698