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

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

Issue 335053002: Add GN build for some chrome common, chrome net, and resources targets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sorting Created 6 years, 6 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 | « chrome/renderer/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f375574f4c3e87bb0bb050c100b33c33acebbbaf..6dc0a4b4558d0980756d6eb25ddeb1ffa45dfa9b 100644
--- a/tools/gn/secondary/tools/grit/grit_rule.gni
+++ b/tools/gn/secondary/tools/grit/grit_rule.gni
@@ -5,13 +5,27 @@
# Instantiate grit. This will produce a script target to run grit, and a
# static library that compiles the .cc files.
#
-# Example:
+# Parameters
+#
+# source
+# Path to .grd file.
+#
+# grit_flags (optional)
+# List of strings containing extra command-line flags to pass to Grit.
+#
+# deps (optional)
+# visibility (optional)
+# Normal meaning.
+#
+# Example
+#
# grit("my_resources") {
# source = "myfile.grd" # source is required.
# grit_flags = [ "-E", "foo=bar" ] # Optional extra flags.
# # You can also put deps here if the grit source depends on generated
# # files.
# }
+import ("//build/config/features.gni")
import ("//build/config/ui.gni")
grit_defines = []
@@ -34,6 +48,15 @@ if (is_android) {
]
}
+if (enable_extensions) {
+ grit_defines += [ "-D", "enable_extensions" ]
+}
+if (enable_plugins) {
+ grit_defines += [ "-D", "enable_plugins" ]
+}
+
+# TODO(GYP) the rest of the grit_defines from the gyp build.
+
grit_resource_id_file = "//tools/gritsettings/resource_ids"
grit_info_script = "//tools/grit/grit_info.py"
@@ -102,6 +125,10 @@ template("grit") {
] + grit_defines + grit_flags
visibility = target_visibility
+
+ if (defined(invoker.deps)) {
+ deps = invoker.deps
+ }
}
# This is the thing that people actually link with, it must be named the
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698