| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 <set> | 5 #include <set> |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "tools/gn/commands.h" | 9 #include "tools/gn/commands.h" |
| 10 #include "tools/gn/config.h" | 10 #include "tools/gn/config.h" |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 target_->output_type() == Target::COPY_FILES) { | 609 target_->output_type() == Target::COPY_FILES) { |
| 610 const SubstitutionList& outputs = target_->action_values().outputs(); | 610 const SubstitutionList& outputs = target_->action_values().outputs(); |
| 611 if (!outputs.required_types().empty()) { | 611 if (!outputs.required_types().empty()) { |
| 612 auto patterns = base::MakeUnique<base::ListValue>(); | 612 auto patterns = base::MakeUnique<base::ListValue>(); |
| 613 for (const auto& elem : outputs.list()) | 613 for (const auto& elem : outputs.list()) |
| 614 patterns->AppendString(elem.AsString()); | 614 patterns->AppendString(elem.AsString()); |
| 615 | 615 |
| 616 res->SetWithoutPathExpansion("output_patterns", std::move(patterns)); | 616 res->SetWithoutPathExpansion("output_patterns", std::move(patterns)); |
| 617 } | 617 } |
| 618 std::vector<SourceFile> output_files; | 618 std::vector<SourceFile> output_files; |
| 619 SubstitutionWriter::ApplyListToSources(target_->settings(), outputs, | 619 SubstitutionWriter::ApplyListToSources(target_, target_->settings(), |
| 620 target_->sources(), &output_files); | 620 outputs, target_->sources(), |
| 621 &output_files); |
| 621 res->SetWithoutPathExpansion(variables::kOutputs, | 622 res->SetWithoutPathExpansion(variables::kOutputs, |
| 622 RenderValue(output_files)); | 623 RenderValue(output_files)); |
| 623 } else { | 624 } else { |
| 624 DCHECK(target_->IsBinary()); | 625 DCHECK(target_->IsBinary()); |
| 625 const Tool* tool = | 626 const Tool* tool = |
| 626 target_->toolchain()->GetToolForTargetFinalOutput(target_); | 627 target_->toolchain()->GetToolForTargetFinalOutput(target_); |
| 627 | 628 |
| 628 std::vector<OutputFile> output_files; | 629 std::vector<OutputFile> output_files; |
| 629 SubstitutionWriter::ApplyListToLinkerAsOutputFile( | 630 SubstitutionWriter::ApplyListToLinkerAsOutputFile( |
| 630 target_, tool, tool->outputs(), &output_files); | 631 target_, tool, tool->outputs(), &output_files); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 | 711 |
| 711 std::unique_ptr<base::DictionaryValue> DescBuilder::DescriptionForConfig( | 712 std::unique_ptr<base::DictionaryValue> DescBuilder::DescriptionForConfig( |
| 712 const Config* config, | 713 const Config* config, |
| 713 const std::string& what) { | 714 const std::string& what) { |
| 714 std::set<std::string> w; | 715 std::set<std::string> w; |
| 715 if (!what.empty()) | 716 if (!what.empty()) |
| 716 w.insert(what); | 717 w.insert(what); |
| 717 ConfigDescBuilder b(config, w); | 718 ConfigDescBuilder b(config, w); |
| 718 return b.BuildDescription(); | 719 return b.BuildDescription(); |
| 719 } | 720 } |
| OLD | NEW |