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

Unified Diff: tools/gn/command_desc.cc

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/bundle_file_rule.cc ('k') | tools/gn/create_bundle_target_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_desc.cc
diff --git a/tools/gn/command_desc.cc b/tools/gn/command_desc.cc
index 801055b0b13e8c027c35a88848a92989b1784f83..15efe77cd6ed493c99f78168b3c660e36bf4500a 100644
--- a/tools/gn/command_desc.cc
+++ b/tools/gn/command_desc.cc
@@ -327,6 +327,11 @@ void PrintOutputs(const Target* target, bool display_header) {
for (const auto& elem : target->action_values().outputs().list()) {
OutputString(" " + elem.AsString() + "\n");
}
+ } else if (target->output_type() == Target::CREATE_BUNDLE) {
+ std::vector<SourceFile> output_files;
+ target->bundle_data().GetOutputsAsSourceFiles(target->settings(),
+ &output_files);
+ PrintFileList(output_files, "", true, false);
} else {
const SubstitutionList& outputs = target->action_values().outputs();
if (!outputs.required_types().empty()) {
@@ -685,7 +690,8 @@ int RunDesc(const std::vector<std::string>& args) {
target->output_type() != Target::COPY_FILES &&
target->output_type() != Target::ACTION &&
target->output_type() != Target::ACTION_FOREACH &&
- target->output_type() != Target::BUNDLE_DATA;
+ target->output_type() != Target::BUNDLE_DATA &&
+ target->output_type() != Target::CREATE_BUNDLE;
// Generally we only want to display toolchains on labels when the toolchain
// is different than the default one for this target (which we always print
@@ -739,7 +745,8 @@ int RunDesc(const std::vector<std::string>& args) {
if (target->output_type() == Target::ACTION ||
target->output_type() == Target::ACTION_FOREACH ||
- target->output_type() == Target::COPY_FILES) {
+ target->output_type() == Target::COPY_FILES ||
+ target->output_type() == Target::CREATE_BUNDLE) {
PrintOutputs(target, true);
}
« no previous file with comments | « tools/gn/bundle_file_rule.cc ('k') | tools/gn/create_bundle_target_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698