OLD | NEW |
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 link_output_file_ = | 524 link_output_file_ = |
525 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile( | 525 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile( |
526 this, tool, tool->link_output()); | 526 this, tool, tool->link_output()); |
527 } | 527 } |
528 if (!tool->depend_output().empty()) { | 528 if (!tool->depend_output().empty()) { |
529 dependency_output_file_ = | 529 dependency_output_file_ = |
530 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile( | 530 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile( |
531 this, tool, tool->depend_output()); | 531 this, tool, tool->depend_output()); |
532 } | 532 } |
533 } | 533 } |
| 534 if (tool->runtime_link_output().empty()) { |
| 535 runtime_link_output_file_ = link_output_file_; |
| 536 } else { |
| 537 runtime_link_output_file_ = |
| 538 SubstitutionWriter::ApplyPatternToLinkerAsOutputFile( |
| 539 this, tool, tool->runtime_link_output()); |
| 540 } |
534 break; | 541 break; |
535 case UNKNOWN: | 542 case UNKNOWN: |
536 default: | 543 default: |
537 NOTREACHED(); | 544 NOTREACHED(); |
538 } | 545 } |
539 | 546 |
540 // Count all outputs from this tool as something generated by this target. | 547 // Count all outputs from this tool as something generated by this target. |
541 if (check_tool_outputs) { | 548 if (check_tool_outputs) { |
542 SubstitutionWriter::ApplyListToLinkerAsOutputFile( | 549 SubstitutionWriter::ApplyListToLinkerAsOutputFile( |
543 this, tool, tool->outputs(), &computed_outputs_); | 550 this, tool, tool->outputs(), &computed_outputs_); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, false, | 717 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, false, |
711 &seen_targets)) { | 718 &seen_targets)) { |
712 // Check object files (much slower and very rare) only if the "normal" | 719 // Check object files (much slower and very rare) only if the "normal" |
713 // output check failed. | 720 // output check failed. |
714 seen_targets.clear(); | 721 seen_targets.clear(); |
715 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, true, | 722 if (!EnsureFileIsGeneratedByDependency(this, out_file, true, true, |
716 &seen_targets)) | 723 &seen_targets)) |
717 g_scheduler->AddUnknownGeneratedInput(this, source); | 724 g_scheduler->AddUnknownGeneratedInput(this, source); |
718 } | 725 } |
719 } | 726 } |
OLD | NEW |