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

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

Issue 583363003: GN: Fix dependency output file handling. (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 | « tools/gn/substitution_pattern.cc ('k') | 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 } else { 315 } else {
316 // Use the tool-specified ones. 316 // Use the tool-specified ones.
317 if (!tool->link_output().empty()) { 317 if (!tool->link_output().empty()) {
318 link_output_file_ = 318 link_output_file_ =
319 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile( 319 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
320 this, tool, tool->link_output()); 320 this, tool, tool->link_output());
321 } 321 }
322 if (!tool->depend_output().empty()) { 322 if (!tool->depend_output().empty()) {
323 dependency_output_file_ = 323 dependency_output_file_ =
324 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile( 324 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile(
325 this, tool, tool->link_output()); 325 this, tool, tool->depend_output());
326 } 326 }
327 } 327 }
328 break; 328 break;
329 case UNKNOWN: 329 case UNKNOWN:
330 default: 330 default:
331 NOTREACHED(); 331 NOTREACHED();
332 } 332 }
333 } 333 }
334 334
335 bool Target::CheckVisibility(Err* err) const { 335 bool Target::CheckVisibility(Err* err) const {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 // Verify no inherited libraries are static libraries. 374 // Verify no inherited libraries are static libraries.
375 for (size_t i = 0; i < inherited_libraries().size(); ++i) { 375 for (size_t i = 0; i < inherited_libraries().size(); ++i) {
376 if (inherited_libraries()[i]->output_type() == Target::STATIC_LIBRARY) { 376 if (inherited_libraries()[i]->output_type() == Target::STATIC_LIBRARY) {
377 *err = MakeStaticLibDepsError(this, inherited_libraries()[i]); 377 *err = MakeStaticLibDepsError(this, inherited_libraries()[i]);
378 return false; 378 return false;
379 } 379 }
380 } 380 }
381 return true; 381 return true;
382 } 382 }
OLDNEW
« no previous file with comments | « tools/gn/substitution_pattern.cc ('k') | tools/gn/target_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698