| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 ConfigValuesGenerator::~ConfigValuesGenerator() { | 60 ConfigValuesGenerator::~ConfigValuesGenerator() { |
| 61 } | 61 } |
| 62 | 62 |
| 63 void ConfigValuesGenerator::Run() { | 63 void ConfigValuesGenerator::Run() { |
| 64 #define FILL_STRING_CONFIG_VALUE(name) \ | 64 #define FILL_STRING_CONFIG_VALUE(name) \ |
| 65 GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_); | 65 GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_); |
| 66 #define FILL_DIR_CONFIG_VALUE(name) \ | 66 #define FILL_DIR_CONFIG_VALUE(name) \ |
| 67 GetDirList(scope_, #name, config_values_, input_dir_, \ | 67 GetDirList(scope_, #name, config_values_, input_dir_, \ |
| 68 &ConfigValues::name, err_); | 68 &ConfigValues::name, err_); |
| 69 | 69 |
| 70 FILL_STRING_CONFIG_VALUE(arflags) |
| 70 FILL_STRING_CONFIG_VALUE(asmflags) | 71 FILL_STRING_CONFIG_VALUE(asmflags) |
| 71 FILL_STRING_CONFIG_VALUE(cflags) | 72 FILL_STRING_CONFIG_VALUE(cflags) |
| 72 FILL_STRING_CONFIG_VALUE(cflags_c) | 73 FILL_STRING_CONFIG_VALUE(cflags_c) |
| 73 FILL_STRING_CONFIG_VALUE(cflags_cc) | 74 FILL_STRING_CONFIG_VALUE(cflags_cc) |
| 74 FILL_STRING_CONFIG_VALUE(cflags_objc) | 75 FILL_STRING_CONFIG_VALUE(cflags_objc) |
| 75 FILL_STRING_CONFIG_VALUE(cflags_objcc) | 76 FILL_STRING_CONFIG_VALUE(cflags_objcc) |
| 76 FILL_STRING_CONFIG_VALUE(defines) | 77 FILL_STRING_CONFIG_VALUE(defines) |
| 77 FILL_DIR_CONFIG_VALUE( include_dirs) | 78 FILL_DIR_CONFIG_VALUE( include_dirs) |
| 78 FILL_STRING_CONFIG_VALUE(ldflags) | 79 FILL_STRING_CONFIG_VALUE(ldflags) |
| 79 FILL_DIR_CONFIG_VALUE( lib_dirs) | 80 FILL_DIR_CONFIG_VALUE( lib_dirs) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 scope_->GetValue(variables::kPrecompiledSource, true); | 112 scope_->GetValue(variables::kPrecompiledSource, true); |
| 112 if (precompiled_source_value) { | 113 if (precompiled_source_value) { |
| 113 config_values_->set_precompiled_source( | 114 config_values_->set_precompiled_source( |
| 114 input_dir_.ResolveRelativeFile( | 115 input_dir_.ResolveRelativeFile( |
| 115 *precompiled_source_value, err_, | 116 *precompiled_source_value, err_, |
| 116 scope_->settings()->build_settings()->root_path_utf8())); | 117 scope_->settings()->build_settings()->root_path_utf8())); |
| 117 if (err_->has_error()) | 118 if (err_->has_error()) |
| 118 return; | 119 return; |
| 119 } | 120 } |
| 120 } | 121 } |
| OLD | NEW |