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

Unified Diff: tools/gn/args.cc

Issue 46683002: GN Mac build work (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | tools/gn/command_gyp.cc » ('j') | tools/gn/gyp_binary_target_writer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/args.cc
diff --git a/tools/gn/args.cc b/tools/gn/args.cc
index 2eead427b88349186e2fea5274c2d82d36186104..2d9aa6e81d0cc670a8a79dd14ffae49c33f83eea 100644
--- a/tools/gn/args.cc
+++ b/tools/gn/args.cc
@@ -135,9 +135,12 @@ bool Args::DeclareArgs(const Scope::KeyValueMap& args,
}
// Only set on the current scope to the new value if it hasn't been already
- // set.
- if (!scope_to_set->GetValue(i->first))
+ // set. Mark the variable used so the build script can override it in
+ // certain cases without getting unused value errors.
+ if (!scope_to_set->GetValue(i->first)) {
scope_to_set->SetValue(i->first, i->second, i->second.origin());
+ scope_to_set->MarkUsed(i->first);
+ }
}
return true;
« no previous file with comments | « no previous file | tools/gn/command_gyp.cc » ('j') | tools/gn/gyp_binary_target_writer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698