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

Side by Side Diff: tools/gn/config_values_generator.cc

Issue 56433003: GN threading refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gn/config_values_generator.h ('k') | tools/gn/copy_target_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "tools/gn/config_values.h" 7 #include "tools/gn/config_values.h"
8 #include "tools/gn/scope.h" 8 #include "tools/gn/scope.h"
9 #include "tools/gn/settings.h" 9 #include "tools/gn/settings.h"
10 #include "tools/gn/value.h" 10 #include "tools/gn/value.h"
(...skipping 29 matching lines...) Expand all
40 return; // No value, empty input and succeed. 40 return; // No value, empty input and succeed.
41 41
42 std::vector<SourceDir> result; 42 std::vector<SourceDir> result;
43 ExtractListOfRelativeDirs(scope->settings()->build_settings(), 43 ExtractListOfRelativeDirs(scope->settings()->build_settings(),
44 *value, input_dir, &result, err); 44 *value, input_dir, &result, err);
45 (config_values->*accessor)().swap(result); 45 (config_values->*accessor)().swap(result);
46 } 46 }
47 47
48 } // namespace 48 } // namespace
49 49
50 ConfigValuesGenerator::ConfigValuesGenerator(ConfigValues* dest_values, 50 ConfigValuesGenerator::ConfigValuesGenerator(
51 Scope* scope, 51 ConfigValues* dest_values,
52 const Token& function_token, 52 Scope* scope,
53 const SourceDir& input_dir, 53 const SourceDir& input_dir,
54 Err* err) 54 Err* err)
55 : config_values_(dest_values), 55 : config_values_(dest_values),
56 scope_(scope), 56 scope_(scope),
57 function_token_(function_token),
58 input_dir_(input_dir), 57 input_dir_(input_dir),
59 err_(err) { 58 err_(err) {
60 } 59 }
61 60
62 ConfigValuesGenerator::~ConfigValuesGenerator() { 61 ConfigValuesGenerator::~ConfigValuesGenerator() {
63 } 62 }
64 63
65 void ConfigValuesGenerator::Run() { 64 void ConfigValuesGenerator::Run() {
66 #define FILL_STRING_CONFIG_VALUE(name) \ 65 #define FILL_STRING_CONFIG_VALUE(name) \
67 GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_); 66 GetStringList(scope_, #name, config_values_, &ConfigValues::name, err_);
68 #define FILL_DIR_CONFIG_VALUE(name) \ 67 #define FILL_DIR_CONFIG_VALUE(name) \
69 GetDirList(scope_, #name, config_values_, input_dir_, \ 68 GetDirList(scope_, #name, config_values_, input_dir_, \
70 &ConfigValues::name, err_); 69 &ConfigValues::name, err_);
71 70
72 FILL_STRING_CONFIG_VALUE(cflags) 71 FILL_STRING_CONFIG_VALUE(cflags)
73 FILL_STRING_CONFIG_VALUE(cflags_c) 72 FILL_STRING_CONFIG_VALUE(cflags_c)
74 FILL_STRING_CONFIG_VALUE(cflags_cc) 73 FILL_STRING_CONFIG_VALUE(cflags_cc)
75 FILL_STRING_CONFIG_VALUE(cflags_objc) 74 FILL_STRING_CONFIG_VALUE(cflags_objc)
76 FILL_STRING_CONFIG_VALUE(cflags_objcc) 75 FILL_STRING_CONFIG_VALUE(cflags_objcc)
77 FILL_STRING_CONFIG_VALUE(defines) 76 FILL_STRING_CONFIG_VALUE(defines)
78 FILL_DIR_CONFIG_VALUE( include_dirs) 77 FILL_DIR_CONFIG_VALUE( include_dirs)
79 FILL_STRING_CONFIG_VALUE(ldflags) 78 FILL_STRING_CONFIG_VALUE(ldflags)
80 FILL_DIR_CONFIG_VALUE( lib_dirs) 79 FILL_DIR_CONFIG_VALUE( lib_dirs)
81 FILL_STRING_CONFIG_VALUE(libs) 80 FILL_STRING_CONFIG_VALUE(libs)
82 81
83 #undef FILL_STRING_CONFIG_VALUE 82 #undef FILL_STRING_CONFIG_VALUE
84 #undef FILL_DIR_CONFIG_VALUE 83 #undef FILL_DIR_CONFIG_VALUE
85 } 84 }
OLDNEW
« no previous file with comments | « tools/gn/config_values_generator.h ('k') | tools/gn/copy_target_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698