Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3351)

Unified Diff: build/toolchain/gcc_toolchain.gni

Issue 2296033002: Only use gcc_compile_wrapper when resource whitelisting is enabled. (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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") {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698