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

Unified Diff: build/compiled_action.gni

Issue 1943583002: GN: forward_variables_from shouldn't clobber vars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: build/compiled_action.gni
diff --git a/build/compiled_action.gni b/build/compiled_action.gni
index 855df7a6e68da80f27ce978bd6c38d68d1a7c26e..c7fb8c65560a44786648eceb653d8d2ed980b635 100644
--- a/build/compiled_action.gni
+++ b/build/compiled_action.gni
@@ -81,8 +81,6 @@ template("compiled_action") {
"compiled_action doesn't take a sources arg. Use inputs instead.")
action(target_name) {
- deps = []
- inputs = []
forward_variables_from(invoker,
[
"deps",
@@ -91,6 +89,12 @@ template("compiled_action") {
"testonly",
"visibility",
])
+ if (!defined(deps)) {
+ deps = []
+ }
+ if (!defined(inputs)) {
+ inputs = []
+ }
script = "//build/gn_run_binary.py"
@@ -124,8 +128,6 @@ template("compiled_action_foreach") {
assert(defined(invoker.args), "args must be defined for $target_name")
action_foreach(target_name) {
- deps = []
- inputs = []
forward_variables_from(invoker,
[
"deps",
@@ -135,6 +137,12 @@ template("compiled_action_foreach") {
"testonly",
"visibility",
])
+ if (!defined(deps)) {
+ deps = []
+ }
+ if (!defined(inputs)) {
+ inputs = []
+ }
script = "//build/gn_run_binary.py"

Powered by Google App Engine
This is Rietveld 408576698