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

Unified Diff: tools/gn/setup.cc

Issue 1621053002: Add an assert_no_deps variable to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment fix Created 4 years, 11 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 | « no previous file | tools/gn/target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/setup.cc
diff --git a/tools/gn/setup.cc b/tools/gn/setup.cc
index 459b87bc5d6e3da36a1856dc89b192131d33f513..79814e602fe7a2f14a152ce9dae5d3d361d5f2d7 100644
--- a/tools/gn/setup.cc
+++ b/tools/gn/setup.cc
@@ -31,6 +31,7 @@
#include "tools/gn/tokenizer.h"
#include "tools/gn/trace.h"
#include "tools/gn/value.h"
+#include "tools/gn/value_extractors.h"
#if defined(OS_WIN)
#include <windows.h>
@@ -655,21 +656,13 @@ bool Setup::FillOtherConfig(const base::CommandLine& cmdline) {
const Value* check_targets_value =
dotfile_scope_.GetValue("check_targets", true);
if (check_targets_value) {
- // Fill the list of targets to check.
- if (!check_targets_value->VerifyTypeIs(Value::LIST, &err)) {
+ check_patterns_.reset(new std::vector<LabelPattern>);
+ ExtractListOfLabelPatterns(*check_targets_value, current_dir,
+ check_patterns_.get(), &err);
+ if (err.has_error()) {
err.PrintToStdout();
return false;
}
-
- check_patterns_.reset(new std::vector<LabelPattern>);
- for (const auto& item : check_targets_value->list_value()) {
- check_patterns_->push_back(
- LabelPattern::GetPattern(current_dir, item, &err));
- if (err.has_error()) {
- err.PrintToStdout();
- return false;
- }
- }
}
// Fill exec_script_whitelist.
« no previous file with comments | « no previous file | tools/gn/target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698