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

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

Issue 1897213002: Fix GN freeze on generating Visual Studio projects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase patch onto current master Created 4 years, 8 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 | « no previous file | tools/gn/visual_studio_writer_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 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 "tools/gn/visual_studio_writer.h" 5 #include "tools/gn/visual_studio_writer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 VisualStudioWriter::SolutionEntry::~SolutionEntry() = default; 174 VisualStudioWriter::SolutionEntry::~SolutionEntry() = default;
175 175
176 VisualStudioWriter::SolutionProject::SolutionProject( 176 VisualStudioWriter::SolutionProject::SolutionProject(
177 const std::string& _name, 177 const std::string& _name,
178 const std::string& _path, 178 const std::string& _path,
179 const std::string& _guid, 179 const std::string& _guid,
180 const std::string& _label_dir_path, 180 const std::string& _label_dir_path,
181 const std::string& _config_platform) 181 const std::string& _config_platform)
182 : SolutionEntry(_name, _path, _guid), 182 : SolutionEntry(_name, _path, _guid),
183 label_dir_path(_label_dir_path), 183 label_dir_path(_label_dir_path),
184 config_platform(_config_platform) {} 184 config_platform(_config_platform) {
185 // Make sure all paths use the same drive letter case. This is especially
186 // important when searching for the common path prefix.
187 label_dir_path[0] = base::ToUpperASCII(label_dir_path[0]);
188 }
185 189
186 VisualStudioWriter::SolutionProject::~SolutionProject() = default; 190 VisualStudioWriter::SolutionProject::~SolutionProject() = default;
187 191
188 VisualStudioWriter::VisualStudioWriter(const BuildSettings* build_settings, 192 VisualStudioWriter::VisualStudioWriter(const BuildSettings* build_settings,
189 const char* config_platform, 193 const char* config_platform,
190 Version version) 194 Version version)
191 : build_settings_(build_settings), 195 : build_settings_(build_settings),
192 config_platform_(config_platform), 196 config_platform_(config_platform),
193 ninja_path_output_(build_settings->build_dir(), 197 ninja_path_output_(build_settings->build_dir(),
194 build_settings->root_path_utf8(), 198 build_settings->root_path_utf8(),
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 } 804 }
801 } 805 }
802 806
803 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) { 807 std::string VisualStudioWriter::GetNinjaTarget(const Target* target) {
804 std::ostringstream ninja_target_out; 808 std::ostringstream ninja_target_out;
805 DCHECK(!target->dependency_output_file().value().empty()); 809 DCHECK(!target->dependency_output_file().value().empty());
806 ninja_path_output_.WriteFile(ninja_target_out, 810 ninja_path_output_.WriteFile(ninja_target_out,
807 target->dependency_output_file()); 811 target->dependency_output_file());
808 return ninja_target_out.str(); 812 return ninja_target_out.str();
809 } 813 }
OLDNEW
« no previous file with comments | « no previous file | tools/gn/visual_studio_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698