Chromium Code Reviews| Index: build/toolchain/gcc_toolchain.gni |
| diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
| index 2ac3e48b760a92d2a32234866e61d1b837b54da9..083f859d9ae8846d61582e1ff09555dc0c374a48 100644 |
| --- a/build/toolchain/gcc_toolchain.gni |
| +++ b/build/toolchain/gcc_toolchain.gni |
| @@ -9,7 +9,6 @@ import("//build/config/v8_target_cpu.gni") |
| import("//build/toolchain/cc_wrapper.gni") |
| import("//build/toolchain/goma.gni") |
| import("//build/toolchain/toolchain.gni") |
| -import("//tools/grit/grit_rule.gni") |
| # This template defines a toolchain for something that works like gcc |
| # (including clang). |
| @@ -220,9 +219,12 @@ template("gcc_toolchain") { |
| # Object files go in this directory. |
| object_subdir = "{{target_out_dir}}/{{label_name}}" |
| + android_should_whitelist = defined(enable_resource_whitelist_generation) && |
| + enable_resource_whitelist_generation |
|
Dirk Pranke
2016/08/29 16:33:00
This should just import("//build/config/android/co
|
| + |
| tool("cc") { |
| whitelist_flag = " " |
| - if (enable_resource_whitelist_generation) { |
| + if (android_should_whitelist) { |
| whitelist_flag = " --resource-whitelist=\"{{output}}.whitelist\"" |
| } |
| depfile = "{{output}}.d" |
| @@ -241,7 +243,7 @@ template("gcc_toolchain") { |
| tool("cxx") { |
| whitelist_flag = " " |
| - if (enable_resource_whitelist_generation) { |
| + if (android_should_whitelist) { |
| whitelist_flag = " --resource-whitelist=\"{{output}}.whitelist\"" |
| } |
| depfile = "{{output}}.d" |
| @@ -272,7 +274,7 @@ template("gcc_toolchain") { |
| tool("alink") { |
| rspfile = "{{output}}.rsp" |
| whitelist_flag = " " |
| - if (enable_resource_whitelist_generation) { |
| + if (android_should_whitelist) { |
| whitelist_flag = " --resource-whitelist=\"{{output}}.whitelist\"" |
| } |
| @@ -301,7 +303,7 @@ template("gcc_toolchain") { |
| rspfile = sofile + ".rsp" |
| pool = "//build/toolchain:link_pool($default_toolchain)" |
| whitelist_flag = " " |
| - if (enable_resource_whitelist_generation) { |
| + if (android_should_whitelist) { |
| whitelist_file = "$sofile.whitelist" |
| whitelist_flag = " --resource-whitelist=\"$whitelist_file\"" |
| } |
| @@ -360,7 +362,7 @@ template("gcc_toolchain") { |
| sofile, |
| tocfile, |
| ] |
| - if (enable_resource_whitelist_generation) { |
| + if (android_should_whitelist) { |
| outputs += [ whitelist_file ] |
| } |
| if (sofile != unstripped_sofile) { |