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

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

Issue 1442013004: Use GN response files for devtools .grd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/generate_devtools_grd.py ('k') | no next file » | 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/action_target_generator.h" 5 #include "tools/gn/action_target_generator.h"
6 6
7 #include "tools/gn/build_settings.h" 7 #include "tools/gn/build_settings.h"
8 #include "tools/gn/err.h" 8 #include "tools/gn/err.h"
9 #include "tools/gn/filesystem_utils.h" 9 #include "tools/gn/filesystem_utils.h"
10 #include "tools/gn/parse_tree.h" 10 #include "tools/gn/parse_tree.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 SUBSTITUTION_RSP_FILE_NAME) != 78 SUBSTITUTION_RSP_FILE_NAME) !=
79 required_args_substitutions.end(); 79 required_args_substitutions.end();
80 if (target_->action_values().uses_rsp_file() && !has_rsp_file_name) { 80 if (target_->action_values().uses_rsp_file() && !has_rsp_file_name) {
81 *err_ = Err(function_call_, "Missing {{response_file_name}} in args.", 81 *err_ = Err(function_call_, "Missing {{response_file_name}} in args.",
82 "This target defines response_file_contents but doesn't use\n" 82 "This target defines response_file_contents but doesn't use\n"
83 "{{response_file_name}} in the args, which means the response file\n" 83 "{{response_file_name}} in the args, which means the response file\n"
84 "will be unused."); 84 "will be unused.");
85 return; 85 return;
86 } 86 }
87 if (!target_->action_values().uses_rsp_file() && has_rsp_file_name) { 87 if (!target_->action_values().uses_rsp_file() && has_rsp_file_name) {
88 *err_ = Err(function_call_, "Missing response_file_content definition.", 88 *err_ = Err(function_call_, "Missing response_file_contents definition.",
89 "This target uses {{response_file_name}} in the args, but does not\n" 89 "This target uses {{response_file_name}} in the args, but does not\n"
90 "define response_file_content which means the response file\n" 90 "define response_file_contents which means the response file\n"
91 "will be empty."); 91 "will be empty.");
92 return; 92 return;
93 } 93 }
94 } 94 }
95 95
96 bool ActionTargetGenerator::FillScript() { 96 bool ActionTargetGenerator::FillScript() {
97 // If this gets called, the target type requires a script, so error out 97 // If this gets called, the target type requires a script, so error out
98 // if it doesn't have one. 98 // if it doesn't have one.
99 const Value* value = scope_->GetValue(variables::kScript, true); 99 const Value* value = scope_->GetValue(variables::kScript, true);
100 if (!value) { 100 if (!value) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 *err_ = Err(function_call_, 176 *err_ = Err(function_call_,
177 "action_foreach should have a pattern in the output.", 177 "action_foreach should have a pattern in the output.",
178 "An action_foreach target should have a source expansion pattern in\n" 178 "An action_foreach target should have a source expansion pattern in\n"
179 "it to map source file to unique output file name. Otherwise, the\n" 179 "it to map source file to unique output file name. Otherwise, the\n"
180 "build system can't determine when your script needs to be run."); 180 "build system can't determine when your script needs to be run.");
181 return false; 181 return false;
182 } 182 }
183 } 183 }
184 return true; 184 return true;
185 } 185 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/generate_devtools_grd.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698