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

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

Issue 213353004: GN: Move towards only using / on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: restore convert_slashes in output path, misc fixes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/build_settings.cc ('k') | tools/gn/filesystem_utils.h » ('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 <algorithm> 5 #include <algorithm>
6 #include <set> 6 #include <set>
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "tools/gn/commands.h" 10 #include "tools/gn/commands.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // Prints the given directory in a nice way for the user to view. 24 // Prints the given directory in a nice way for the user to view.
25 std::string FormatSourceDir(const SourceDir& dir) { 25 std::string FormatSourceDir(const SourceDir& dir) {
26 #if defined(OS_WIN) 26 #if defined(OS_WIN)
27 // On Windows we fix up system absolute paths to look like native ones. 27 // On Windows we fix up system absolute paths to look like native ones.
28 // Internally, they'll look like "/C:\foo\bar/" 28 // Internally, they'll look like "/C:\foo\bar/"
29 if (dir.is_system_absolute()) { 29 if (dir.is_system_absolute()) {
30 std::string buf = dir.value(); 30 std::string buf = dir.value();
31 if (buf.size() > 3 && buf[2] == ':') { 31 if (buf.size() > 3 && buf[2] == ':') {
32 buf.erase(buf.begin()); // Erase beginning slash. 32 buf.erase(buf.begin()); // Erase beginning slash.
33 ConvertPathToSystem(&buf); // Convert to backslashes.
34 return buf; 33 return buf;
35 } 34 }
36 } 35 }
37 #endif 36 #endif
38 return dir.value(); 37 return dir.value();
39 } 38 }
40 39
41 void RecursiveCollectChildDeps(const Target* target, std::set<Label>* result); 40 void RecursiveCollectChildDeps(const Target* target, std::set<Label>* result);
42 41
43 void RecursiveCollectDeps(const Target* target, std::set<Label>* result) { 42 void RecursiveCollectDeps(const Target* target, std::set<Label>* result) {
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 OUTPUT_CONFIG_VALUE(ldflags, std::string) 374 OUTPUT_CONFIG_VALUE(ldflags, std::string)
376 PrintLibs(target, true); 375 PrintLibs(target, true);
377 PrintLibDirs(target, true); 376 PrintLibDirs(target, true);
378 377
379 PrintDeps(target, true); 378 PrintDeps(target, true);
380 379
381 return 0; 380 return 0;
382 } 381 }
383 382
384 } // namespace commands 383 } // namespace commands
OLDNEW
« no previous file with comments | « tools/gn/build_settings.cc ('k') | tools/gn/filesystem_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698