diff options
author | agrieve <agrieve@chromium.org> | 2015-11-05 18:04:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-06 02:05:13 +0000 |
commit | edbc7f9d90b7116357173f28b1b211937924a9a5 (patch) | |
tree | c03293f9e839956b57d345a75f03c90920b02b5b /build/secondary | |
parent | a352204885ce8e8aebee2189bbed244a763aa7a2 (diff) | |
download | chromium_src-edbc7f9d90b7116357173f28b1b211937924a9a5.zip chromium_src-edbc7f9d90b7116357173f28b1b211937924a9a5.tar.gz chromium_src-edbc7f9d90b7116357173f28b1b211937924a9a5.tar.bz2 |
Allow repack whitelist to be set via GN args
BUG=551576
Review URL: https://codereview.chromium.org/1422553008
Cr-Commit-Position: refs/heads/master@{#358230}
Diffstat (limited to 'build/secondary')
-rw-r--r-- | build/secondary/tools/grit/repack.gni | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/build/secondary/tools/grit/repack.gni b/build/secondary/tools/grit/repack.gni index 1030674..673fdf7 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) |