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

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

Issue 1751903003: Add "bundle_data" target as first step for adding bundle support to gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-typos
Patch Set: Rebase Created 4 years, 9 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 | « tools/gn/target.h ('k') | tools/gn/target_generator.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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 case STATIC_LIBRARY: 215 case STATIC_LIBRARY:
216 return "Static library"; 216 return "Static library";
217 case SOURCE_SET: 217 case SOURCE_SET:
218 return "Source set"; 218 return "Source set";
219 case COPY_FILES: 219 case COPY_FILES:
220 return "Copy"; 220 return "Copy";
221 case ACTION: 221 case ACTION:
222 return "Action"; 222 return "Action";
223 case ACTION_FOREACH: 223 case ACTION_FOREACH:
224 return "ActionForEach"; 224 return "ActionForEach";
225 case BUNDLE_DATA:
226 return "Bundle data";
225 default: 227 default:
226 return ""; 228 return "";
227 } 229 }
228 } 230 }
229 231
230 Target* Target::AsTarget() { 232 Target* Target::AsTarget() {
231 return this; 233 return this;
232 } 234 }
233 235
234 const Target* Target::AsTarget() const { 236 const Target* Target::AsTarget() const {
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 recursive_hard_deps_.insert(pair.ptr->recursive_hard_deps().begin(), 474 recursive_hard_deps_.insert(pair.ptr->recursive_hard_deps().begin(),
473 pair.ptr->recursive_hard_deps().end()); 475 pair.ptr->recursive_hard_deps().end());
474 } 476 }
475 } 477 }
476 478
477 void Target::FillOutputFiles() { 479 void Target::FillOutputFiles() {
478 const Tool* tool = toolchain_->GetToolForTargetFinalOutput(this); 480 const Tool* tool = toolchain_->GetToolForTargetFinalOutput(this);
479 bool check_tool_outputs = false; 481 bool check_tool_outputs = false;
480 switch (output_type_) { 482 switch (output_type_) {
481 case GROUP: 483 case GROUP:
484 case BUNDLE_DATA:
482 case SOURCE_SET: 485 case SOURCE_SET:
483 case COPY_FILES: 486 case COPY_FILES:
484 case ACTION: 487 case ACTION:
485 case ACTION_FOREACH: { 488 case ACTION_FOREACH: {
486 // These don't get linked to and use stamps which should be the first 489 // These don't get linked to and use stamps which should be the first
487 // entry in the outputs. These stamps are named 490 // entry in the outputs. These stamps are named
488 // "<target_out_dir>/<targetname>.stamp". 491 // "<target_out_dir>/<targetname>.stamp".
489 dependency_output_file_ = GetTargetOutputDirAsOutputFile(this); 492 dependency_output_file_ = GetTargetOutputDirAsOutputFile(this);
490 dependency_output_file_.value().append(GetComputedOutputName(true)); 493 dependency_output_file_.value().append(GetComputedOutputName(true));
491 dependency_output_file_.value().append(".stamp"); 494 dependency_output_file_.value().append(".stamp");
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, false, 720 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, false,
718 &seen_targets)) { 721 &seen_targets)) {
719 // Check object files (much slower and very rare) only if the "normal" 722 // Check object files (much slower and very rare) only if the "normal"
720 // output check failed. 723 // output check failed.
721 seen_targets.clear(); 724 seen_targets.clear();
722 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, true, 725 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, true,
723 &seen_targets)) 726 &seen_targets))
724 g_scheduler->AddUnknownGeneratedInput(this, source); 727 g_scheduler->AddUnknownGeneratedInput(this, source);
725 } 728 }
726 } 729 }
OLDNEW
« no previous file with comments | « tools/gn/target.h ('k') | tools/gn/target_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698