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

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

Issue 2880093002: gn desc: printing public_deps without --all and --tree
Patch Set: Created 3 years, 7 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
« tools/gn/command_desc.cc ('K') | « tools/gn/target.h ('k') | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 output_type_ == SHARED_LIBRARY || 411 output_type_ == SHARED_LIBRARY ||
412 output_type_ == LOADABLE_MODULE || 412 output_type_ == LOADABLE_MODULE ||
413 output_type_ == ACTION || 413 output_type_ == ACTION ||
414 output_type_ == ACTION_FOREACH || 414 output_type_ == ACTION_FOREACH ||
415 output_type_ == COPY_FILES || 415 output_type_ == COPY_FILES ||
416 output_type_ == CREATE_BUNDLE || 416 output_type_ == CREATE_BUNDLE ||
417 (output_type_ == STATIC_LIBRARY && complete_static_lib_); 417 (output_type_ == STATIC_LIBRARY && complete_static_lib_);
418 } 418 }
419 419
420 DepsIteratorRange Target::GetDeps(DepsIterationType type) const { 420 DepsIteratorRange Target::GetDeps(DepsIterationType type) const {
421 if (type == DEPS_LINKED) { 421 if (type == DEPS_LINKED) {
brettw 2017/05/23 17:23:05 With the additional enum types, I think this funct
mbonadei1 2017/05/26 09:29:44 Done.
422 return DepsIteratorRange(DepsIterator( 422 return DepsIteratorRange(DepsIterator(
423 &public_deps_, &private_deps_, nullptr)); 423 &public_deps_, &private_deps_, nullptr));
424 } 424 }
425 if (type == DEPS_PRIVATE) {
426 return DepsIteratorRange(
427 DepsIterator(&private_deps_, &data_deps_, nullptr));
428 }
429 if (type == DEPS_PUBLIC) {
430 return DepsIteratorRange(DepsIterator(&public_deps_, nullptr, nullptr));
431 }
425 // All deps. 432 // All deps.
426 return DepsIteratorRange(DepsIterator( 433 return DepsIteratorRange(DepsIterator(
427 &public_deps_, &private_deps_, &data_deps_)); 434 &public_deps_, &private_deps_, &data_deps_));
428 } 435 }
429 436
430 std::string Target::GetComputedOutputName() const { 437 std::string Target::GetComputedOutputName() const {
431 DCHECK(toolchain_) 438 DCHECK(toolchain_)
432 << "Toolchain must be specified before getting the computed output name."; 439 << "Toolchain must be specified before getting the computed output name.";
433 440
434 const std::string& name = output_name_.empty() ? label().name() 441 const std::string& name = output_name_.empty() ? label().name()
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file); 862 check_data_deps = g_scheduler->IsFileGeneratedByWriteRuntimeDeps(out_file);
856 // Check object files (much slower and very rare) only if the "normal" 863 // Check object files (much slower and very rare) only if the "normal"
857 // output check failed. 864 // output check failed.
858 consider_object_files = !check_data_deps; 865 consider_object_files = !check_data_deps;
859 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, 866 if (!EnsureFileIsGeneratedByDependency(this, out_file, true,
860 consider_object_files, 867 consider_object_files,
861 check_data_deps, &seen_targets)) 868 check_data_deps, &seen_targets))
862 g_scheduler->AddUnknownGeneratedInput(this, source); 869 g_scheduler->AddUnknownGeneratedInput(this, source);
863 } 870 }
864 } 871 }
OLDNEW
« tools/gn/command_desc.cc ('K') | « tools/gn/target.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698