Index: tools/grit/repack.gni |
diff --git a/tools/grit/repack.gni b/tools/grit/repack.gni |
index 0f257bb7c4274c1f478ac05e1c3018d37676593b..7dd1520a56263f656b75b12948cb713c09da039b 100644 |
--- a/tools/grit/repack.gni |
+++ b/tools/grit/repack.gni |
@@ -2,7 +2,11 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-import("//tools/grit/grit_rule.gni") |
+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. |
# |
@@ -37,11 +41,11 @@ |
] |
args = [] |
- if (defined(invoker.repack_whitelist)) { |
- inputs += [ invoker.repack_whitelist ] |
- _rebased_whitelist = rebase_path(invoker.repack_whitelist) |
- args += [ "--whitelist=$_rebased_whitelist" ] |
- args += [ "--suppress-removed-key-output" ] |
+ 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) |