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

Unified Diff: tools/gn/target.h

Issue 1752033002: Add "create_bundle" target in order to support bundle with gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-bundle-data
Patch Set: Add unit tests, address comments, update docs and format with clang-format Created 4 years, 9 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/substitution_type.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 9afd0fabf1d90d1f0b9cd8054b9e672315a225b5..95e682f8ad020ca01b2e44d7ccac66ca4404e0ce 100644
--- a/tools/gn/target.h
+++ b/tools/gn/target.h
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "tools/gn/action_values.h"
+#include "tools/gn/bundle_data.h"
#include "tools/gn/config_values.h"
#include "tools/gn/inherited_libraries.h"
#include "tools/gn/item.h"
@@ -45,6 +46,7 @@ class Target : public Item {
ACTION,
ACTION_FOREACH,
BUNDLE_DATA,
+ CREATE_BUNDLE,
};
enum DepsIterationType {
@@ -136,12 +138,18 @@ class Target : public Item {
const std::vector<std::string>& data() const { return data_; }
std::vector<std::string>& data() { return data_; }
+ // Information about the bundle. Only valid for CREATE_BUNDLE target after
+ // they have been resolved.
+ const BundleData& bundle_data() const { return bundle_data_; }
+ BundleData& bundle_data() { return bundle_data_; }
+
// Returns true if targets depending on this one should have an order
// dependency.
bool hard_dep() const {
return output_type_ == ACTION ||
output_type_ == ACTION_FOREACH ||
- output_type_ == COPY_FILES;
+ output_type_ == COPY_FILES ||
+ output_type_ == CREATE_BUNDLE;
}
// Returns the iterator range which can be used in range-based for loops
@@ -284,6 +292,7 @@ class Target : public Item {
void PullDependentTargetLibsFrom(const Target* dep, bool is_public);
void PullDependentTargetLibs();
void PullRecursiveHardDeps();
+ void PullRecursiveBundleData();
// Fills the link and dependency output files when a target is resolved.
void FillOutputFiles();
@@ -312,6 +321,7 @@ class Target : public Item {
bool testonly_;
FileList inputs_;
std::vector<std::string> data_;
+ BundleData bundle_data_;
LabelTargetVector private_deps_;
LabelTargetVector public_deps_;
« no previous file with comments | « tools/gn/substitution_type.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698