| Index: tools/gn/target_generator.cc
|
| diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
|
| index 657581ac0166560067eaee51ebae4f3dc68920b2..02c055e336e748a97af486b22ba1697e77eeaeb8 100644
|
| --- a/tools/gn/target_generator.cc
|
| +++ b/tools/gn/target_generator.cc
|
| @@ -48,6 +48,10 @@ void TargetGenerator::Run() {
|
| if (err_->has_error())
|
| return;
|
|
|
| + FillTestonly();
|
| + if (err_->has_error())
|
| + return;
|
| +
|
| if (!Visibility::FillItemVisibility(target_, scope_, err_))
|
| return;
|
|
|
| @@ -217,6 +221,15 @@ void TargetGenerator::FillDependencies() {
|
| return;
|
| }
|
|
|
| +void TargetGenerator::FillTestonly() {
|
| + const Value* value = scope_->GetValue(variables::kTestonly, true);
|
| + if (value) {
|
| + if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
|
| + return;
|
| + target_->set_testonly(value->boolean_value());
|
| + }
|
| +}
|
| +
|
| void TargetGenerator::FillOutputs(bool allow_substitutions) {
|
| const Value* value = scope_->GetValue(variables::kOutputs, true);
|
| if (!value)
|
|
|