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

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

Issue 1422553008: Allow repack whitelist to be set via GN args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/secondary/tools/grit/repack.gni
diff --git a/build/secondary/tools/grit/repack.gni b/build/secondary/tools/grit/repack.gni
index 1030674c62eadbafe43a72c485edcde4f860e2bc..673fdf79436cad91e340bc863b243b73881578d2 100644
--- a/build/secondary/tools/grit/repack.gni
+++ b/build/secondary/tools/grit/repack.gni
@@ -2,6 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+declare_args() {
+ # Absolute path to a resource whitelist (generated using
+ # //tools/resources/find_used_resources.py).
+ repack_whitelist = ""
+}
+
# This file defines a template to invoke grit repack in a consistent manner.
#
# Parameters:
@@ -11,9 +17,6 @@
# output [required]
# File name (single string) of the output file.
#
-# repack_options [optional]
-# List of extra arguments to pass.
-#
# deps [optional]
# visibility [optional]
# Normal meaning.
@@ -34,8 +37,11 @@ template("repack") {
]
args = []
- if (defined(invoker.repack_options)) {
- args += invoker.repack_options
+ if (repack_whitelist != "") {
+ assert(
+ repack_whitelist == rebase_path(repack_whitelist),
+ "repack_whitelist must be an absolute path. Current value is $repack_whitelist")
+ args += [ "--whitelist=$repack_whitelist" ]
}
args += [ rebase_path(invoker.output, root_build_dir) ]
args += rebase_path(invoker.sources, root_build_dir)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698