Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index efc79b3fc413e2f8fe0c135884e5f4ff43fe6fd4..7ee2b6ad25e011bdbba41a6f11e9e7145204771d 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -221,10 +221,6 @@ template("gcc_toolchain") { |
object_subdir = "{{target_out_dir}}/{{label_name}}" |
tool("cc") { |
- whitelist_flag = " " |
- if (enable_resource_whitelist_generation) { |
- whitelist_flag = " --resource-whitelist=\"{{output}}.whitelist\"" |
- } |
depfile = "{{output}}.d" |
command = "$cc -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}${extra_cppflags}${extra_cflags} -c {{source}} -o {{output}}" |
depsformat = "gcc" |
@@ -234,16 +230,15 @@ template("gcc_toolchain") { |
# currently support multiple outputs for tool("cc"). |
"$object_subdir/{{source_name_part}}.o", |
] |
- compile_wrapper = rebase_path("//build/toolchain/gcc_compile_wrapper.py", |
- root_build_dir) |
- command = "$python_path \"$compile_wrapper\"$whitelist_flag $command" |
+ if (enable_resource_whitelist_generation) { |
+ compile_wrapper = |
+ rebase_path("//build/toolchain/gcc_compile_wrapper.py", |
+ root_build_dir) |
+ command = "$python_path \"$compile_wrapper\" --resource-whitelist=\"{{output}}.whitelist\" $command" |
+ } |
} |
tool("cxx") { |
- whitelist_flag = " " |
- if (enable_resource_whitelist_generation) { |
- whitelist_flag = " --resource-whitelist=\"{{output}}.whitelist\"" |
- } |
depfile = "{{output}}.d" |
command = "$cxx -MMD -MF $depfile ${rebuild_string}{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}${extra_cppflags}${extra_cxxflags} -c {{source}} -o {{output}}" |
depsformat = "gcc" |
@@ -253,9 +248,12 @@ template("gcc_toolchain") { |
# currently support multiple outputs for tool("cxx"). |
"$object_subdir/{{source_name_part}}.o", |
] |
- compile_wrapper = rebase_path("//build/toolchain/gcc_compile_wrapper.py", |
- root_build_dir) |
- command = "$python_path \"$compile_wrapper\"$whitelist_flag $command" |
+ if (enable_resource_whitelist_generation) { |
+ compile_wrapper = |
+ rebase_path("//build/toolchain/gcc_compile_wrapper.py", |
+ root_build_dir) |
+ command = "$python_path \"$compile_wrapper\" --resource-whitelist=\"{{output}}.whitelist\" $command" |
+ } |
} |
tool("asm") { |