| 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;
|
|
|