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/settings.h" | 5 #include "tools/gn/settings.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "tools/gn/filesystem_utils.h" | 9 #include "tools/gn/filesystem_utils.h" |
10 | 10 |
11 Settings::Settings(const BuildSettings* build_settings, | 11 Settings::Settings(const BuildSettings* build_settings, |
12 const Toolchain* toolchain, | |
13 const std::string& output_subdir_name) | 12 const std::string& output_subdir_name) |
14 : build_settings_(build_settings), | 13 : build_settings_(build_settings), |
15 toolchain_(toolchain), | 14 is_default_(false), |
16 import_manager_(), | 15 import_manager_(), |
17 base_config_(this), | 16 base_config_(this), |
18 greedy_target_generation_(false) { | 17 greedy_target_generation_(false) { |
19 DCHECK(output_subdir_name.find('/') == std::string::npos); | 18 DCHECK(output_subdir_name.find('/') == std::string::npos); |
20 if (output_subdir_name.empty()) { | 19 if (output_subdir_name.empty()) { |
21 toolchain_output_dir_ = build_settings->build_dir(); | 20 toolchain_output_dir_ = build_settings->build_dir(); |
22 } else { | 21 } else { |
23 // We guarantee this ends in a slash. | 22 // We guarantee this ends in a slash. |
24 toolchain_output_subdir_.value().append(output_subdir_name); | 23 toolchain_output_subdir_.value().append(output_subdir_name); |
25 toolchain_output_subdir_.value().push_back('/'); | 24 toolchain_output_subdir_.value().push_back('/'); |
(...skipping 14 matching lines...) Expand all Loading... |
40 target_os_ = LINUX; | 39 target_os_ = LINUX; |
41 #else | 40 #else |
42 #error implement me | 41 #error implement me |
43 #endif | 42 #endif |
44 } | 43 } |
45 | 44 |
46 Settings::~Settings() { | 45 Settings::~Settings() { |
47 } | 46 } |
48 | 47 |
49 | 48 |
OLD | NEW |