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

Unified Diff: tools/gn/target.h

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/ninja_binary_target_writer_unittest.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target.h
diff --git a/tools/gn/target.h b/tools/gn/target.h
index bdb3de52073ff8a39ff89c8028413c2c7f194fb6..ef194f87f73f8a34c089d0949d1b7a385a5c1522 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -58,8 +58,12 @@ class Target : public Item {
OutputType output_type() const { return output_type_; }
void set_output_type(OutputType t) { output_type_ = t; }
+ // Can be linked into other targets.
bool IsLinkable() const;
+ // Can have dependencies linked in.
+ bool IsFinal() const;
+
// Will be the empty string to use the target label as the output name.
// See GetComputedOutputName().
const std::string& output_name() const { return output_name_; }
@@ -95,6 +99,13 @@ class Target : public Item {
bool check_includes() const { return check_includes_; }
void set_check_includes(bool ci) { check_includes_ = ci; }
+ // Whether this static_library target should have code linked in.
+ bool complete_static_lib() const { return complete_static_lib_; }
+ void set_complete_static_lib(bool complete) {
+ DCHECK_EQ(STATIC_LIBRARY, output_type_);
+ complete_static_lib_ = complete;
+ }
+
bool testonly() const { return testonly_; }
void set_testonly(bool value) { testonly_ = value; }
@@ -239,6 +250,7 @@ class Target : public Item {
bool all_headers_public_;
FileList public_headers_;
bool check_includes_;
+ bool complete_static_lib_;
bool testonly_;
FileList inputs_;
FileList data_;
« no previous file with comments | « tools/gn/ninja_binary_target_writer_unittest.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698