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

Unified Diff: tools/gn/binary_target_generator.cc

Issue 565283002: GN: Add notion of 'complete' static libraries, akin to GYP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually process new argument. Duh. Created 6 years, 3 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 | « tools/gn/binary_target_generator.h ('k') | tools/gn/ninja_binary_target_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « tools/gn/binary_target_generator.h ('k') | tools/gn/ninja_binary_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698