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/config_values_generator.h" | 5 #include "tools/gn/config_values_generator.h" |
6 | 6 |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "tools/gn/config_values.h" | 8 #include "tools/gn/config_values.h" |
9 #include "tools/gn/scope.h" | 9 #include "tools/gn/scope.h" |
10 #include "tools/gn/settings.h" | 10 #include "tools/gn/settings.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 ConfigValuesGenerator::~ConfigValuesGenerator() { | 62 ConfigValuesGenerator::~ConfigValuesGenerator() { |
63 } | 63 } |
64 | 64 |
65 void ConfigValuesGenerator::Run() { | 65 void ConfigValuesGenerator::Run() { |
66 #define FILL_STRING_CONFIG_VALUE(name) \ | 66 #define FILL_STRING_CONFIG_VALUE(name) \ |
67 GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_); | 67 GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_); |
68 #define FILL_DIR_CONFIG_VALUE(name) \ | 68 #define FILL_DIR_CONFIG_VALUE(name) \ |
69 GetDirList(scope_, #name, config_values_, input_dir_, \ | 69 GetDirList(scope_, #name, config_values_, input_dir_, \ |
70 &ConfigValues::name, err_); | 70 &ConfigValues::name, err_); |
71 | 71 |
| 72 FILL_STRING_CONFIG_VALUE(arflags) |
72 FILL_STRING_CONFIG_VALUE(cflags) | 73 FILL_STRING_CONFIG_VALUE(cflags) |
73 FILL_STRING_CONFIG_VALUE(cflags_c) | 74 FILL_STRING_CONFIG_VALUE(cflags_c) |
74 FILL_STRING_CONFIG_VALUE(cflags_cc) | 75 FILL_STRING_CONFIG_VALUE(cflags_cc) |
75 FILL_STRING_CONFIG_VALUE(cflags_objc) | 76 FILL_STRING_CONFIG_VALUE(cflags_objc) |
76 FILL_STRING_CONFIG_VALUE(cflags_objcc) | 77 FILL_STRING_CONFIG_VALUE(cflags_objcc) |
77 FILL_STRING_CONFIG_VALUE(defines) | 78 FILL_STRING_CONFIG_VALUE(defines) |
78 FILL_DIR_CONFIG_VALUE( include_dirs) | 79 FILL_DIR_CONFIG_VALUE( include_dirs) |
79 FILL_STRING_CONFIG_VALUE(ldflags) | 80 FILL_STRING_CONFIG_VALUE(ldflags) |
80 FILL_DIR_CONFIG_VALUE( lib_dirs) | 81 FILL_DIR_CONFIG_VALUE( lib_dirs) |
81 FILL_STRING_CONFIG_VALUE(libs) | 82 FILL_STRING_CONFIG_VALUE(libs) |
(...skipping 24 matching lines...) Expand all Loading... |
106 scope_->GetValue(variables::kPrecompiledSource, true); | 107 scope_->GetValue(variables::kPrecompiledSource, true); |
107 if (precompiled_source_value) { | 108 if (precompiled_source_value) { |
108 config_values_->set_precompiled_source( | 109 config_values_->set_precompiled_source( |
109 input_dir_.ResolveRelativeFile( | 110 input_dir_.ResolveRelativeFile( |
110 *precompiled_source_value, err_, | 111 *precompiled_source_value, err_, |
111 scope_->settings()->build_settings()->root_path_utf8())); | 112 scope_->settings()->build_settings()->root_path_utf8())); |
112 if (err_->has_error()) | 113 if (err_->has_error()) |
113 return; | 114 return; |
114 } | 115 } |
115 } | 116 } |
OLD | NEW |