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 <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 Loading... |
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 Loading... |
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 |
OLD | NEW |