Chromium Code Reviews| Index: chrome/BUILD.gn |
| diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn |
| index f27421aa9b39cb1be934c99e14fa036b0e657f65..af56178aee814d0a616f6f5223704e7d05322629 100644 |
| --- a/chrome/BUILD.gn |
| +++ b/chrome/BUILD.gn |
| @@ -17,6 +17,8 @@ import("//chrome/version.gni") |
| import("//ui/base/ui_features.gni") |
| import("//v8/gni/v8.gni") |
| +android_resource_whitelist = "$target_gen_dir/resource_whitelist.txt" |
| + |
| if (is_android) { |
| import("//build/config/android/rules.gni") |
| } else if (is_mac) { |
| @@ -1483,6 +1485,11 @@ repack("packed_extra_resources") { |
| } else { |
| output = "$root_out_dir/resources.pak" |
| } |
| + |
| + if (is_android && enable_resource_whitelist_generation) { |
| + repack_whitelist = android_resource_whitelist |
| + deps += [ "//chrome:resource_whitelist" ] |
| + } |
| } |
| # GYP version: chrome/chrome_resources.gyp:browser_tests_pak |
| @@ -1597,6 +1604,11 @@ template("chrome_repack_percent") { |
| } |
| output = repack_output_file |
| + |
| + if (is_android && enable_resource_whitelist_generation) { |
| + repack_whitelist = android_resource_whitelist |
| + deps += [ "//chrome:resource_whitelist" ] |
| + } |
| } |
| copy(copy_name) { |
| @@ -1764,6 +1776,31 @@ if (is_android) { |
| } |
| } |
| +action("resource_whitelist") { |
|
agrieve
2016/07/29 01:55:21
You should guard this target behind: if (is_androi
estevenson
2016/07/29 15:33:57
Done.
|
| + deps = [ |
| + "//chrome/android:chrome", |
| + ] |
| + script = "//tools/resources/generate_resource_whitelist.py" |
| + |
| + _infile = "$root_out_dir/libchrome.cr.so.whitelist" |
| + inputs = [ |
| + _infile, |
| + ] |
| + |
| + _outfile = android_resource_whitelist |
| + outputs = [ |
| + _outfile, |
| + ] |
| + |
| + args = [ |
| + "-i", |
| + rebase_path(_infile, root_build_dir), |
| + "-o", |
| + rebase_path(_outfile, root_build_dir), |
| + "--out-dir=.", |
| + ] |
| +} |
| + |
| if (is_linux) { |
| action("manpage") { |
| if (is_chrome_branded) { |