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

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

Issue 551843006: GN: fix datadeps visibility check (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/target_unittest.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/target.h" 5 #include "tools/gn/target.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "tools/gn/config_values_extractors.h" 10 #include "tools/gn/config_values_extractors.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // (expanded groups) will have a null origin. We don't want to check 355 // (expanded groups) will have a null origin. We don't want to check
356 // visibility for these, since the point of a group would often be to 356 // visibility for these, since the point of a group would often be to
357 // forward visibility. 357 // forward visibility.
358 for (size_t i = 0; i < deps_.size(); i++) { 358 for (size_t i = 0; i < deps_.size(); i++) {
359 if (deps_[i].origin && 359 if (deps_[i].origin &&
360 !Visibility::CheckItemVisibility(this, deps_[i].ptr, err)) 360 !Visibility::CheckItemVisibility(this, deps_[i].ptr, err))
361 return false; 361 return false;
362 } 362 }
363 363
364 for (size_t i = 0; i < datadeps_.size(); i++) { 364 for (size_t i = 0; i < datadeps_.size(); i++) {
365 if (deps_[i].origin && 365 if (datadeps_[i].origin &&
366 !Visibility::CheckItemVisibility(this, datadeps_[i].ptr, err)) 366 !Visibility::CheckItemVisibility(this, datadeps_[i].ptr, err))
367 return false; 367 return false;
368 } 368 }
369 369
370 return true; 370 return true;
371 } 371 }
372 372
373 bool Target::CheckTestonly(Err* err) const { 373 bool Target::CheckTestonly(Err* err) const {
374 // If there current target is marked testonly, it can include both testonly 374 // If there current target is marked testonly, it can include both testonly
375 // and non-testonly targets, so there's nothing to check. 375 // and non-testonly targets, so there's nothing to check.
(...skipping 10 matching lines...) Expand all
386 386
387 for (size_t i = 0; i < datadeps_.size(); i++) { 387 for (size_t i = 0; i < datadeps_.size(); i++) {
388 if (datadeps_[i].ptr->testonly()) { 388 if (datadeps_[i].ptr->testonly()) {
389 *err = MakeTestOnlyError(this, datadeps_[i].ptr); 389 *err = MakeTestOnlyError(this, datadeps_[i].ptr);
390 return false; 390 return false;
391 } 391 }
392 } 392 }
393 393
394 return true; 394 return true;
395 } 395 }
OLDNEW
« no previous file with comments | « no previous file | tools/gn/target_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698