| 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 178fb6429969836769932d578293993ab553ab37..c8028c055aa8f63043c1e652d80d6af086b7e2ae 100644
|
| --- a/build/secondary/tools/grit/grit_rule.gni
|
| +++ b/build/secondary/tools/grit/grit_rule.gni
|
| @@ -27,6 +27,9 @@
|
| # python tools/grit/grit_info.py --outputs . path/to/your.grd
|
| # And strip the leading "./" from the output files.
|
| #
|
| +# defines (optional)
|
| +# Extra defines to pass to grit (on top of the global grit_defines list).
|
| +#
|
| # grit_flags (optional)
|
| # List of strings containing extra command-line flags to pass to Grit.
|
| #
|
| @@ -269,7 +272,16 @@ template("grit") {
|
| "-o", rebased_output_dir,
|
| "--depdir", ".",
|
| "--depfile", rebase_path(depfile, root_build_dir),
|
| - ] + grit_defines + grit_flags + assert_files_flags
|
| + ] + grit_defines
|
| +
|
| + # Add extra defines with -D flags.
|
| + if (defined(invoker.defines)) {
|
| + foreach (i, invoker.defines) {
|
| + args += [ "-D", i ]
|
| + }
|
| + }
|
| +
|
| + args += grit_flags + assert_files_flags
|
|
|
| visibility = target_visibility
|
|
|
|
|