summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 16:34:40 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 16:34:40 +0000
commitb53f916c804c2556be0e453e247af003de03f847 (patch)
tree37e3b59b611952b56e0515c81dfdeb40b4e1614b /content
parentb89c53844b2ede863c9cbb6878320657db1fde71 (diff)
downloadchromium_src-b53f916c804c2556be0e453e247af003de03f847.zip
chromium_src-b53f916c804c2556be0e453e247af003de03f847.tar.gz
chromium_src-b53f916c804c2556be0e453e247af003de03f847.tar.bz2
Update the tracing grit GN rule
Previously this rule had a lot of custom stuff to work around the fact that the grit rule couldn't run at GN time to get the inputs and outputs. Now that the inputs are lazy, we can use the template. R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/414623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284948 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/tracing/BUILD.gn41
1 files changed, 12 insertions, 29 deletions
diff --git a/content/browser/tracing/BUILD.gn b/content/browser/tracing/BUILD.gn
index e34904e..42ba3b9 100644
--- a/content/browser/tracing/BUILD.gn
+++ b/content/browser/tracing/BUILD.gn
@@ -12,7 +12,7 @@ tracing_gen_dir = "$root_gen_dir/content/browser/tracing"
tracing_grd = "$tracing_gen_dir/tracing_resources.grd"
action("generate_tracing_grd") {
- visibility = ":resources"
+ visibility = ":*"
script = "generate_trace_viewer_grd.py"
input_pages = [
@@ -31,36 +31,19 @@ action("generate_tracing_grd") {
]
}
-# This can't use the grit template because the grd file is generated at build
-# time, so the trick of using grit_info to get the real inputs/outputs at GYP
-# time isn't possible.
-action("resources") {
- script = "//tools/grit/grit.py"
-
- # Get the list of grit script sources.
- grit_inputs_build_rel =
- exec_script("//tools/grit/grit_info.py", [ "--inputs" ], "list lines")
-
- inputs = rebase_path(grit_inputs_build_rel, ".", root_build_dir) + [
- grit_resource_id_file,
- ]
+grit("resources") {
+ source = tracing_grd
outputs = [
- "$target_gen_dir/grit/tracing_resources.h",
- "$target_gen_dir/tracing_resources.pak",
+ "grit/tracing_resources.h",
+ "tracing_resources.pak",
]
- args = [
- "-i", rebase_path(tracing_grd, root_build_dir), "build",
- "-f", rebase_path(grit_resource_id_file, root_build_dir),
- "-o", rebase_path(target_gen_dir, root_build_dir),
- # resource_ids has an entry for our .grd file that looks like:
- # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd"
- # and what we pass here should make that resolve to our .grd file.
- "-DSHARED_INTERMEDIATE_DIR=" +
- rebase_path(root_gen_dir, root_build_dir),
- ] + grit_defines
-
- deps = [
- ":generate_tracing_grd",
+ # resource_ids has an entry for our .grd file that looks like:
+ # "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd"
+ # and what we pass here should make that resolve to our .grd file.
+ defines = [
+ "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir),
]
+
+ deps = [ ":generate_tracing_grd" ]
}