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

Unified Diff: tools/gn/bundle_data.cc

Issue 2205693005: Add bundle_deps_filter to create_bundle targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/bundle_data.cc
diff --git a/tools/gn/bundle_data.cc b/tools/gn/bundle_data.cc
index 448eac96b425f52bb54e952ebda1438e32567699..1d8a7dbffc42f3371bfb4981299c3d82e567e4a4 100644
--- a/tools/gn/bundle_data.cc
+++ b/tools/gn/bundle_data.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "tools/gn/filesystem_utils.h"
+#include "tools/gn/label_pattern.h"
#include "tools/gn/output_file.h"
#include "tools/gn/settings.h"
#include "tools/gn/substitution_writer.h"
@@ -52,6 +53,10 @@ BundleData::~BundleData() {}
void BundleData::AddBundleData(const Target* target) {
DCHECK_EQ(target->output_type(), Target::BUNDLE_DATA);
+ for (const auto& pattern : deps_filter_) {
+ if (pattern.Matches(target->label()))
+ return;
+ }
bundle_deps_.push_back(target);
}

Powered by Google App Engine
This is Rietveld 408576698