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

Side by Side 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: Fix test in Target::PullDependentTargetInfo, add test 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/binary_target_generator.h" 5 #include "tools/gn/binary_target_generator.h"
6 6
7 #include "tools/gn/config_values_generator.h" 7 #include "tools/gn/config_values_generator.h"
8 #include "tools/gn/err.h" 8 #include "tools/gn/err.h"
9 #include "tools/gn/functions.h" 9 #include "tools/gn/functions.h"
10 #include "tools/gn/scope.h" 10 #include "tools/gn/scope.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 void BinaryTargetGenerator::FillCheckIncludes() { 70 void BinaryTargetGenerator::FillCheckIncludes() {
71 const Value* value = scope_->GetValue(variables::kCheckIncludes, true); 71 const Value* value = scope_->GetValue(variables::kCheckIncludes, true);
72 if (!value) 72 if (!value)
73 return; 73 return;
74 if (!value->VerifyTypeIs(Value::BOOLEAN, err_)) 74 if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
75 return; 75 return;
76 target_->set_check_includes(value->boolean_value()); 76 target_->set_check_includes(value->boolean_value());
77 } 77 }
78 78
79 void BinaryTargetGenerator::FillCompleteStaticLib() {
brettw 2014/09/12 23:05:06 You forgot to call this function, silly-pants!
Chris Masone 2014/09/12 23:15:00 Done.
80 if (target_->output_type() == Target::STATIC_LIBRARY) {
81 const Value* value = scope_->GetValue(variables::kCompleteStaticLib, true);
82 if (!value)
83 return;
84 if (!value->VerifyTypeIs(Value::BOOLEAN, err_))
85 return;
86 target_->set_complete_static_lib(value->boolean_value());
87 }
88 }
89
79 void BinaryTargetGenerator::FillOutputName() { 90 void BinaryTargetGenerator::FillOutputName() {
80 const Value* value = scope_->GetValue(variables::kOutputName, true); 91 const Value* value = scope_->GetValue(variables::kOutputName, true);
81 if (!value) 92 if (!value)
82 return; 93 return;
83 if (!value->VerifyTypeIs(Value::STRING, err_)) 94 if (!value->VerifyTypeIs(Value::STRING, err_))
84 return; 95 return;
85 target_->set_output_name(value->string_value()); 96 target_->set_output_name(value->string_value());
86 } 97 }
87 98
88 void BinaryTargetGenerator::FillOutputExtension() { 99 void BinaryTargetGenerator::FillOutputExtension() {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 "allow_circular_includes_from only allows\ntargets present in the " 134 "allow_circular_includes_from only allows\ntargets present in the "
124 "deps."); 135 "deps.");
125 return; 136 return;
126 } 137 }
127 } 138 }
128 139
129 // Add to the set. 140 // Add to the set.
130 for (size_t i = 0; i < circular.size(); i++) 141 for (size_t i = 0; i < circular.size(); i++)
131 target_->allow_circular_includes_from().insert(circular[i]); 142 target_->allow_circular_includes_from().insert(circular[i]);
132 } 143 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698