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

Unified Diff: tools/gn/command_format.cc

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch that compiles and passes unit tests on both Windows and Linux Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/build_settings.cc ('k') | tools/gn/filesystem_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/command_format.cc
diff --git a/tools/gn/command_format.cc b/tools/gn/command_format.cc
index a72e2ec33325d332b1edac0be47d058f970f108a..bf2053f1c65374851cf61dc8147c40abf0056ae2 100644
--- a/tools/gn/command_format.cc
+++ b/tools/gn/command_format.cc
@@ -751,7 +751,8 @@ int RunFormat(const std::vector<std::string>& args) {
Setup setup;
SourceDir source_dir =
SourceDirForCurrentDirectory(setup.build_settings().root_path());
- SourceFile file = source_dir.ResolveRelativeFile(args[0]);
+ SourceFile file = source_dir.ResolveRelativeFile(args[0],
+ setup.build_settings().root_path_utf8());
std::string output_string;
if (FormatFileToString(&setup, file, dump_tree, &output_string)) {
« 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