| Index: tools/gn/scope.cc
|
| diff --git a/tools/gn/scope.cc b/tools/gn/scope.cc
|
| index 2bf9dd467da7903b5ff4a874915d5f1481429fea..ee2b1fe4d2bda1e3dedc5fda63f1e9d630d7e2c4 100644
|
| --- a/tools/gn/scope.cc
|
| +++ b/tools/gn/scope.cc
|
| @@ -25,6 +25,13 @@ bool IsPrivateVar(const base::StringPiece& name) {
|
|
|
| } // namespace
|
|
|
| +// Defaults to all false, which are the things least likely to cause errors.
|
| +Scope::MergeOptions::MergeOptions()
|
| + : clobber_existing(false),
|
| + skip_private_vars(false),
|
| + mark_dest_used(false) {}
|
| +
|
| +Scope::MergeOptions::~MergeOptions() {}
|
|
|
| Scope::ProgrammaticProvider::~ProgrammaticProvider() {
|
| scope_->RemoveProvider(this);
|
| @@ -251,6 +258,11 @@ bool Scope::NonRecursiveMergeTo(Scope* dest,
|
| for (const auto& pair : values_) {
|
| if (options.skip_private_vars && IsPrivateVar(pair.first))
|
| continue; // Skip this private var.
|
| + if (!options.excluded_values.empty() &&
|
| + options.excluded_values.find(pair.first.as_string()) !=
|
| + options.excluded_values.end()) {
|
| + continue; // Skip this excluded value.
|
| + }
|
|
|
| const Value& new_value = pair.second.value;
|
| if (!options.clobber_existing) {
|
|
|