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

Unified Diff: tools/gn/target.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 added the variable now 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
Index: tools/gn/target.cc
diff --git a/tools/gn/target.cc b/tools/gn/target.cc
index 592cceac8b4958239350f36f93d976984015ec4c..cc4da95e3c06f75c7894d13fb70c077570e88416 100644
--- a/tools/gn/target.cc
+++ b/tools/gn/target.cc
@@ -73,6 +73,7 @@ Target::Target(const Settings* settings, const Label& label)
output_type_(UNKNOWN),
all_headers_public_(true),
check_includes_(true),
+ complete_static_lib_(false),
testonly_(false),
hard_dep_(false),
toolchain_(NULL) {
@@ -160,6 +161,11 @@ bool Target::IsLinkable() const {
return output_type_ == STATIC_LIBRARY || output_type_ == SHARED_LIBRARY;
}
+bool Target::IsFinal() const {
+ return output_type_ == EXECUTABLE || output_type_ == SHARED_LIBRARY ||
+ (output_type_ == STATIC_LIBRARY && complete_static_lib_);
+}
+
std::string Target::GetComputedOutputName(bool include_prefix) const {
DCHECK(toolchain_)
<< "Toolchain must be specified before getting the computed output name.";
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/variables.h » ('j') | tools/gn/variables.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698