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 "tools/gn/setup.h" | 5 #include "tools/gn/setup.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 | 288 |
289 if (scheduler_.verbose_logging()) | 289 if (scheduler_.verbose_logging()) |
290 scheduler_.Log("Using source root", FilePathToUTF8(root_path)); | 290 scheduler_.Log("Using source root", FilePathToUTF8(root_path)); |
291 build_settings_.SetRootPath(root_path); | 291 build_settings_.SetRootPath(root_path); |
292 | 292 |
293 return true; | 293 return true; |
294 } | 294 } |
295 | 295 |
296 bool Setup::FillBuildDir(const std::string& build_dir) { | 296 bool Setup::FillBuildDir(const std::string& build_dir) { |
297 std::string normalized_build_dir = PathToSystem(build_dir); | |
298 | |
299 SourceDir resolved = | 297 SourceDir resolved = |
300 SourceDirForCurrentDirectory(build_settings_.root_path()). | 298 SourceDirForCurrentDirectory(build_settings_.root_path()). |
301 ResolveRelativeDir(normalized_build_dir); | 299 ResolveRelativeDir(build_dir); |
302 if (resolved.is_null()) { | 300 if (resolved.is_null()) { |
303 Err(Location(), "Couldn't resolve build directory.", | 301 Err(Location(), "Couldn't resolve build directory.", |
304 "The build directory supplied (\"" + build_dir + "\") was not valid."). | 302 "The build directory supplied (\"" + build_dir + "\") was not valid."). |
305 PrintToStdout(); | 303 PrintToStdout(); |
306 return false; | 304 return false; |
307 } | 305 } |
308 | 306 |
309 if (scheduler_.verbose_logging()) | 307 if (scheduler_.verbose_logging()) |
310 scheduler_.Log("Using build dir", resolved.value()); | 308 scheduler_.Log("Using build dir", resolved.value()); |
311 build_settings_.SetBuildDir(resolved); | 309 build_settings_.SetBuildDir(resolved); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 } | 431 } |
434 | 432 |
435 void DependentSetup::RunPreMessageLoop() { | 433 void DependentSetup::RunPreMessageLoop() { |
436 CommonSetup::RunPreMessageLoop(); | 434 CommonSetup::RunPreMessageLoop(); |
437 } | 435 } |
438 | 436 |
439 bool DependentSetup::RunPostMessageLoop() { | 437 bool DependentSetup::RunPostMessageLoop() { |
440 return CommonSetup::RunPostMessageLoop(); | 438 return CommonSetup::RunPostMessageLoop(); |
441 } | 439 } |
442 | 440 |
OLD | NEW |