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

Side by Side Diff: tools/gn/builder.cc

Issue 524623005: Add testonly flag to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/gn/command_gen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/builder.h" 5 #include "tools/gn/builder.h"
6 6
7 #include "tools/gn/config.h" 7 #include "tools/gn/config.h"
8 #include "tools/gn/err.h" 8 #include "tools/gn/err.h"
9 #include "tools/gn/loader.h" 9 #include "tools/gn/loader.h"
10 #include "tools/gn/scheduler.h" 10 #include "tools/gn/scheduler.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 !ResolveForwardDependentConfigs(target, err) || 411 !ResolveForwardDependentConfigs(target, err) ||
412 !ResolveToolchain(target, err)) 412 !ResolveToolchain(target, err))
413 return false; 413 return false;
414 } else if (record->type() == BuilderRecord::ITEM_TOOLCHAIN) { 414 } else if (record->type() == BuilderRecord::ITEM_TOOLCHAIN) {
415 Toolchain* toolchain = record->item()->AsToolchain(); 415 Toolchain* toolchain = record->item()->AsToolchain();
416 if (!ResolveDeps(&toolchain->deps(), err)) 416 if (!ResolveDeps(&toolchain->deps(), err))
417 return false; 417 return false;
418 } 418 }
419 419
420 record->set_resolved(true); 420 record->set_resolved(true);
421 record->item()->OnResolved(); 421
422 if (!record->item()->OnResolved(err))
423 return false;
422 if (!resolved_callback_.is_null()) 424 if (!resolved_callback_.is_null())
423 resolved_callback_.Run(record); 425 resolved_callback_.Run(record);
424 426
425 // Recursively update everybody waiting on this item to be resolved. 427 // Recursively update everybody waiting on this item to be resolved.
426 BuilderRecordSet& waiting_set = record->waiting_on_resolution(); 428 BuilderRecordSet& waiting_set = record->waiting_on_resolution();
427 for (BuilderRecordSet::iterator i = waiting_set.begin(); 429 for (BuilderRecordSet::iterator i = waiting_set.begin();
428 i != waiting_set.end(); ++i) { 430 i != waiting_set.end(); ++i) {
429 BuilderRecord* waiting = *i; 431 BuilderRecord* waiting = *i;
430 DCHECK(waiting->unresolved_deps().find(record) != 432 DCHECK(waiting->unresolved_deps().find(record) !=
431 waiting->unresolved_deps().end()); 433 waiting->unresolved_deps().end());
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // Walk backwards since the dependency arrows point in the reverse direction. 529 // Walk backwards since the dependency arrows point in the reverse direction.
528 std::string ret; 530 std::string ret;
529 for (int i = static_cast<int>(cycle.size()) - 1; i >= 0; i--) { 531 for (int i = static_cast<int>(cycle.size()) - 1; i >= 0; i--) {
530 ret += " " + cycle[i]->label().GetUserVisibleName(false); 532 ret += " " + cycle[i]->label().GetUserVisibleName(false);
531 if (i != 0) 533 if (i != 0)
532 ret += " ->\n"; 534 ret += " ->\n";
533 } 535 }
534 536
535 return ret; 537 return ret;
536 } 538 }
OLDNEW
« no previous file with comments | « no previous file | tools/gn/command_gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698