Index: tools/gn/binary_target_generator.cc |
diff --git a/tools/gn/binary_target_generator.cc b/tools/gn/binary_target_generator.cc |
index b11a529dc0ff0a6baf570c00133a98e3d3d7ab10..16dadb2e656dad388e746607fb4653beb83eef32 100644 |
--- a/tools/gn/binary_target_generator.cc |
+++ b/tools/gn/binary_target_generator.cc |
@@ -59,6 +59,10 @@ void BinaryTargetGenerator::DoRun() { |
if (err_->has_error()) |
return; |
+ FillCompleteStaticLib(); |
+ if (err_->has_error()) |
+ return; |
+ |
// Config values (compiler flags, etc.) set directly on this target. |
ConfigValuesGenerator gen(&target_->config_values(), scope_, |
scope_->GetSourceDir(), err_); |
@@ -76,6 +80,17 @@ void BinaryTargetGenerator::FillCheckIncludes() { |
target_->set_check_includes(value->boolean_value()); |
} |
+void BinaryTargetGenerator::FillCompleteStaticLib() { |
+ if (target_->output_type() == Target::STATIC_LIBRARY) { |
+ const Value* value = scope_->GetValue(variables::kCompleteStaticLib, true); |
+ if (!value) |
+ return; |
+ if (!value->VerifyTypeIs(Value::BOOLEAN, err_)) |
+ return; |
+ target_->set_complete_static_lib(value->boolean_value()); |
+ } |
+} |
+ |
void BinaryTargetGenerator::FillOutputName() { |
const Value* value = scope_->GetValue(variables::kOutputName, true); |
if (!value) |