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

Unified Diff: build/config/nacl/rules.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/config/nacl/rules.gni
diff --git a/build/config/nacl/rules.gni b/build/config/nacl/rules.gni
index 4ae7c536dc52fc1cd9b60ef8ccc6a74a46d96f95..bfc3ec3b8f63642eef20246c26dc5182500a9c74 100644
--- a/build/config/nacl/rules.gni
+++ b/build/config/nacl/rules.gni
@@ -21,8 +21,6 @@ template("generate_nmf") {
assert(defined(invoker.nmf), "Must define nmf")
action(target_name) {
- nmfflags = []
-
forward_variables_from(invoker,
[
"deps",
@@ -36,6 +34,9 @@ template("generate_nmf") {
"testonly",
"visibility",
])
+ if (!defined(nmfflags)) {
+ nmfflags = []
+ }
# TODO(phosek): Remove this conditional once
# https://bugs.chromium.org/p/nativeclient/issues/detail?id=4339 is
@@ -119,15 +120,12 @@ template("generate_nonsfi_test_nmf") {
assert(defined(invoker.nmf), "Must define nmf")
action(target_name) {
- nmfflags = []
-
forward_variables_from(invoker,
[
"deps",
"data_deps",
"executable",
"nmf",
- "nmfflags",
"testonly",
"public_deps",
"visibility",
@@ -152,9 +150,12 @@ template("generate_nonsfi_test_nmf") {
arch = target_cpu
}
args = [
- "--program=" + rebase_path(executable, root_build_dir),
- "--arch=${arch}",
- "--output=" + rebase_path(nmf, root_build_dir),
- ] + nmfflags
+ "--program=" + rebase_path(executable, root_build_dir),
+ "--arch=${arch}",
+ "--output=" + rebase_path(nmf, root_build_dir),
+ ]
+ if (defined(invoker.nmfflags)) {
+ args += invoker.nmfflags
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698