| Index: tools/gn/secondary/tools/grit/grit_rule.gni
|
| diff --git a/tools/gn/secondary/tools/grit/grit_rule.gni b/tools/gn/secondary/tools/grit/grit_rule.gni
|
| index d658cbc5ae2df3c063da1eafe9c8bff90510de7b..f14a17588a8fab0552db85bedd2e67037e040ef4 100644
|
| --- a/tools/gn/secondary/tools/grit/grit_rule.gni
|
| +++ b/tools/gn/secondary/tools/grit/grit_rule.gni
|
| @@ -55,6 +55,9 @@ template("grit") {
|
| grit_config = target_name + "_grit_config"
|
| config(grit_config) {
|
| include_dirs = [ target_gen_dir ]
|
| +
|
| + # Only our generated static library can depend on this.
|
| + visibility = ":" + target_name
|
| }
|
|
|
| grit_custom_target = target_name + "_grit"
|
| @@ -70,7 +73,8 @@ template("grit") {
|
| "-o", output_dir,
|
| ] + grit_flags
|
|
|
| - # Inherit deps from template invocation if any.
|
| + # Only our generated static library can depend on this.
|
| + visibility = ":" + target_name
|
| }
|
|
|
| # This is the thing that people actually link with, it must be named the
|
| @@ -86,5 +90,9 @@ template("grit") {
|
| deps = []
|
| deps = [ ":$grit_custom_target" ]
|
| direct_dependent_configs = [ ":$grit_config" ]
|
| +
|
| + if (defined(invoker.visibility)) {
|
| + visibility = invoker.visibility
|
| + }
|
| }
|
| }
|
|
|