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

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

Issue 46313003: Implement target visibility in GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/builder.h ('k') | 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 !ResolveConfigs(&target->configs(), err) || 371 !ResolveConfigs(&target->configs(), err) ||
372 !ResolveConfigs(&target->all_dependent_configs(), err) || 372 !ResolveConfigs(&target->all_dependent_configs(), err) ||
373 !ResolveConfigs(&target->direct_dependent_configs(), err) || 373 !ResolveConfigs(&target->direct_dependent_configs(), err) ||
374 !ResolveForwardDependentConfigs(target, err)) 374 !ResolveForwardDependentConfigs(target, err))
375 return false; 375 return false;
376 } 376 }
377 377
378 record->set_resolved(true); 378 record->set_resolved(true);
379 record->item()->OnResolved(); 379 record->item()->OnResolved();
380 if (!resolved_callback_.is_null()) 380 if (!resolved_callback_.is_null())
381 resolved_callback_.Run(record->item()); 381 resolved_callback_.Run(record);
382 382
383 // Recursively update everybody waiting on this item to be resolved. 383 // Recursively update everybody waiting on this item to be resolved.
384 BuilderRecordSet& waiting_set = record->waiting_on_resolution(); 384 BuilderRecordSet& waiting_set = record->waiting_on_resolution();
385 for (BuilderRecordSet::iterator i = waiting_set.begin(); 385 for (BuilderRecordSet::iterator i = waiting_set.begin();
386 i != waiting_set.end(); ++i) { 386 i != waiting_set.end(); ++i) {
387 BuilderRecord* waiting = *i; 387 BuilderRecord* waiting = *i;
388 DCHECK(waiting->unresolved_deps().find(record) != 388 DCHECK(waiting->unresolved_deps().find(record) !=
389 waiting->unresolved_deps().end()); 389 waiting->unresolved_deps().end());
390 waiting->unresolved_deps().erase(record); 390 waiting->unresolved_deps().erase(record);
391 391
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 // Walk backwards since the dependency arrows point in the reverse direction. 462 // Walk backwards since the dependency arrows point in the reverse direction.
463 std::string ret; 463 std::string ret;
464 for (int i = static_cast<int>(cycle.size()) - 1; i >= 0; i--) { 464 for (int i = static_cast<int>(cycle.size()) - 1; i >= 0; i--) {
465 ret += " " + cycle[i]->label().GetUserVisibleName(false); 465 ret += " " + cycle[i]->label().GetUserVisibleName(false);
466 if (i != 0) 466 if (i != 0)
467 ret += " ->\n"; 467 ret += " ->\n";
468 } 468 }
469 469
470 return ret; 470 return ret;
471 } 471 }
OLDNEW
« no previous file with comments | « tools/gn/builder.h ('k') | tools/gn/command_gen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698