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 <algorithm> | 5 #include <algorithm> |
6 #include <set> | 6 #include <set> |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "tools/gn/commands.h" | 10 #include "tools/gn/commands.h" |
11 #include "tools/gn/config.h" | 11 #include "tools/gn/config.h" |
12 #include "tools/gn/config_values_extractors.h" | 12 #include "tools/gn/config_values_extractors.h" |
| 13 #include "tools/gn/file_template.h" |
13 #include "tools/gn/filesystem_utils.h" | 14 #include "tools/gn/filesystem_utils.h" |
14 #include "tools/gn/item.h" | 15 #include "tools/gn/item.h" |
15 #include "tools/gn/label.h" | 16 #include "tools/gn/label.h" |
16 #include "tools/gn/setup.h" | 17 #include "tools/gn/setup.h" |
17 #include "tools/gn/standard_out.h" | 18 #include "tools/gn/standard_out.h" |
18 #include "tools/gn/target.h" | 19 #include "tools/gn/target.h" |
19 | 20 |
20 namespace commands { | 21 namespace commands { |
21 | 22 |
22 namespace { | 23 namespace { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 const LabelTargetVector& target_datadeps = target->datadeps(); | 123 const LabelTargetVector& target_datadeps = target->datadeps(); |
123 for (size_t i = 0; i < target_datadeps.size(); i++) | 124 for (size_t i = 0; i < target_datadeps.size(); i++) |
124 deps.push_back(target_datadeps[i].label); | 125 deps.push_back(target_datadeps[i].label); |
125 } | 126 } |
126 | 127 |
127 std::sort(deps.begin(), deps.end()); | 128 std::sort(deps.begin(), deps.end()); |
128 for (size_t i = 0; i < deps.size(); i++) | 129 for (size_t i = 0; i < deps.size(); i++) |
129 OutputString(" " + deps[i].GetUserVisibleName(toolchain_label) + "\n"); | 130 OutputString(" " + deps[i].GetUserVisibleName(toolchain_label) + "\n"); |
130 } | 131 } |
131 | 132 |
| 133 void PrintForwardDependentConfigsFrom(const Target* target, |
| 134 bool display_header) { |
| 135 if (target->forward_dependent_configs().empty()) |
| 136 return; |
| 137 |
| 138 if (display_header) |
| 139 OutputString("\nforward_dependent_configs_from:\n"); |
| 140 |
| 141 // Collect the sorted list of deps. |
| 142 std::vector<Label> forward; |
| 143 for (size_t i = 0; i < target->forward_dependent_configs().size(); i++) |
| 144 forward.push_back(target->forward_dependent_configs()[i].label); |
| 145 std::sort(forward.begin(), forward.end()); |
| 146 |
| 147 Label toolchain_label = target->label().GetToolchainLabel(); |
| 148 for (size_t i = 0; i < forward.size(); i++) |
| 149 OutputString(" " + forward[i].GetUserVisibleName(toolchain_label) + "\n"); |
| 150 } |
| 151 |
132 // libs and lib_dirs are special in that they're inherited. We don't currently | 152 // libs and lib_dirs are special in that they're inherited. We don't currently |
133 // implement a blame feature for this since the bottom-up inheritance makes | 153 // implement a blame feature for this since the bottom-up inheritance makes |
134 // this difficult. | 154 // this difficult. |
135 void PrintLibDirs(const Target* target, bool display_header) { | 155 void PrintLibDirs(const Target* target, bool display_header) { |
136 const OrderedSet<SourceDir>& lib_dirs = target->all_lib_dirs(); | 156 const OrderedSet<SourceDir>& lib_dirs = target->all_lib_dirs(); |
137 if (lib_dirs.empty()) | 157 if (lib_dirs.empty()) |
138 return; | 158 return; |
139 | 159 |
140 if (display_header) | 160 if (display_header) |
141 OutputString("\nlib_dirs\n"); | 161 OutputString("\nlib_dirs\n"); |
142 | 162 |
143 for (size_t i = 0; i < lib_dirs.size(); i++) | 163 for (size_t i = 0; i < lib_dirs.size(); i++) |
144 OutputString(" " + FormatSourceDir(lib_dirs[i]) + "\n"); | 164 OutputString(" " + FormatSourceDir(lib_dirs[i]) + "\n"); |
145 } | 165 } |
146 | 166 |
147 void PrintLibs(const Target* target, bool display_header) { | 167 void PrintLibs(const Target* target, bool display_header) { |
148 const OrderedSet<std::string>& libs = target->all_libs(); | 168 const OrderedSet<std::string>& libs = target->all_libs(); |
149 if (libs.empty()) | 169 if (libs.empty()) |
150 return; | 170 return; |
151 | 171 |
152 if (display_header) | 172 if (display_header) |
153 OutputString("\nlibs\n"); | 173 OutputString("\nlibs\n"); |
154 | 174 |
155 for (size_t i = 0; i < libs.size(); i++) | 175 for (size_t i = 0; i < libs.size(); i++) |
156 OutputString(" " + libs[i] + "\n"); | 176 OutputString(" " + libs[i] + "\n"); |
157 } | 177 } |
158 | 178 |
159 void PrintPublic(const Target* target, bool display_header) { | 179 void PrintPublic(const Target* target, bool display_header) { |
160 if (display_header) | 180 if (display_header) |
161 OutputString("\npublic\n"); | 181 OutputString("\npublic:\n"); |
162 | 182 |
163 if (target->all_headers_public()) { | 183 if (target->all_headers_public()) { |
164 OutputString(" [All headers listed in the sources are public.]\n"); | 184 OutputString(" [All headers listed in the sources are public.]\n"); |
165 return; | 185 return; |
166 } | 186 } |
167 | 187 |
168 Target::FileList public_headers = target->public_headers(); | 188 Target::FileList public_headers = target->public_headers(); |
169 std::sort(public_headers.begin(), public_headers.end()); | 189 std::sort(public_headers.begin(), public_headers.end()); |
170 for (size_t i = 0; i < public_headers.size(); i++) | 190 for (size_t i = 0; i < public_headers.size(); i++) |
171 OutputString(" " + public_headers[i].value() + "\n"); | 191 OutputString(" " + public_headers[i].value() + "\n"); |
172 } | 192 } |
173 | 193 |
174 void PrintVisibility(const Target* target, bool display_header) { | 194 void PrintVisibility(const Target* target, bool display_header) { |
175 if (display_header) | 195 if (display_header) |
176 OutputString("\nvisibility\n"); | 196 OutputString("\nvisibility:\n"); |
177 | 197 |
178 OutputString(target->visibility().Describe(2, false)); | 198 OutputString(target->visibility().Describe(2, false)); |
179 } | 199 } |
180 | 200 |
181 void PrintConfigs(const Target* target, bool display_header) { | 201 void PrintConfigsVector(const Target* target, |
182 // Configs (don't sort since the order determines how things are processed). | 202 const LabelConfigVector& configs, |
| 203 const std::string& heading, |
| 204 bool display_header) { |
| 205 if (configs.empty()) |
| 206 return; |
| 207 |
| 208 // Don't sort since the order determines how things are processed. |
183 if (display_header) | 209 if (display_header) |
184 OutputString("\nConfigs (in order applying):\n"); | 210 OutputString("\n" + heading + " (in order applying):\n"); |
185 | 211 |
186 Label toolchain_label = target->label().GetToolchainLabel(); | 212 Label toolchain_label = target->label().GetToolchainLabel(); |
187 const LabelConfigVector& configs = target->configs(); | |
188 for (size_t i = 0; i < configs.size(); i++) { | 213 for (size_t i = 0; i < configs.size(); i++) { |
189 OutputString(" " + | 214 OutputString(" " + |
190 configs[i].label.GetUserVisibleName(toolchain_label) + "\n"); | 215 configs[i].label.GetUserVisibleName(toolchain_label) + "\n"); |
191 } | 216 } |
192 } | 217 } |
193 | 218 |
| 219 void PrintConfigs(const Target* target, bool display_header) { |
| 220 PrintConfigsVector(target, target->configs(), "configs", display_header); |
| 221 } |
| 222 |
| 223 void PrintDirectDependentConfigs(const Target* target, bool display_header) { |
| 224 PrintConfigsVector(target, target->direct_dependent_configs(), |
| 225 "direct_dependent_configs", display_header); |
| 226 } |
| 227 |
| 228 void PrintAllDependentConfigs(const Target* target, bool display_header) { |
| 229 PrintConfigsVector(target, target->all_dependent_configs(), |
| 230 "all_dependent_configs", display_header); |
| 231 } |
| 232 |
| 233 void PrintFileList(const Target::FileList& files, |
| 234 const std::string& header, |
| 235 bool indent_extra, |
| 236 bool display_header) { |
| 237 if (files.empty()) |
| 238 return; |
| 239 |
| 240 if (display_header) |
| 241 OutputString("\n" + header + ":\n"); |
| 242 |
| 243 std::string indent = indent_extra ? " " : " "; |
| 244 |
| 245 Target::FileList sorted = files; |
| 246 std::sort(sorted.begin(), sorted.end()); |
| 247 for (size_t i = 0; i < sorted.size(); i++) |
| 248 OutputString(indent + sorted[i].value() + "\n"); |
| 249 } |
| 250 |
194 void PrintSources(const Target* target, bool display_header) { | 251 void PrintSources(const Target* target, bool display_header) { |
| 252 PrintFileList(target->sources(), "sources", false, display_header); |
| 253 } |
| 254 |
| 255 void PrintInputs(const Target* target, bool display_header) { |
| 256 PrintFileList(target->inputs(), "inputs", false, display_header); |
| 257 } |
| 258 |
| 259 void PrintOutputs(const Target* target, bool display_header) { |
| 260 if (target->output_type() == Target::ACTION) { |
| 261 // Just display the outputs directly. |
| 262 PrintFileList(target->action_values().outputs(), "outputs", false, |
| 263 display_header); |
| 264 } else if (target->output_type() == Target::ACTION_FOREACH) { |
| 265 // Display both the output pattern and resolved list. |
| 266 if (display_header) |
| 267 OutputString("\noutputs:\n"); |
| 268 |
| 269 // Display the pattern. |
| 270 OutputString(" Output pattern:\n"); |
| 271 PrintFileList(target->action_values().outputs(), "", true, false); |
| 272 |
| 273 // Now display what that resolves to given the sources. |
| 274 OutputString("\n Resolved output file list:\n"); |
| 275 |
| 276 std::vector<std::string> output_strings; |
| 277 FileTemplate file_template = FileTemplate::GetForTargetOutputs(target); |
| 278 for (size_t i = 0; i < target->sources().size(); i++) |
| 279 file_template.ApplyString(target->sources()[i].value(), &output_strings); |
| 280 |
| 281 std::sort(output_strings.begin(), output_strings.end()); |
| 282 for (size_t i = 0; i < output_strings.size(); i++) { |
| 283 OutputString(" " + output_strings[i] + "\n"); |
| 284 } |
| 285 } |
| 286 } |
| 287 |
| 288 void PrintScript(const Target* target, bool display_header) { |
195 if (display_header) | 289 if (display_header) |
196 OutputString("\nSources:\n"); | 290 OutputString("\nscript:\n"); |
| 291 OutputString(" " + target->action_values().script().value() + "\n"); |
| 292 } |
197 | 293 |
198 Target::FileList sources = target->sources(); | 294 void PrintArgs(const Target* target, bool display_header) { |
199 std::sort(sources.begin(), sources.end()); | 295 if (display_header) |
200 for (size_t i = 0; i < sources.size(); i++) | 296 OutputString("\nargs:\n"); |
201 OutputString(" " + sources[i].value() + "\n"); | 297 for (size_t i = 0; i < target->action_values().args().size(); i++) |
| 298 OutputString(" " + target->action_values().args()[i] + "\n"); |
| 299 } |
| 300 |
| 301 void PrintDepfile(const Target* target, bool display_header) { |
| 302 if (target->action_values().depfile().value().empty()) |
| 303 return; |
| 304 if (display_header) |
| 305 OutputString("\ndepfile:\n"); |
| 306 OutputString(" " + target->action_values().depfile().value() + "\n"); |
202 } | 307 } |
203 | 308 |
204 // Attribute the origin for attributing from where a target came from. Does | 309 // Attribute the origin for attributing from where a target came from. Does |
205 // nothing if the input is null or it does not have a location. | 310 // nothing if the input is null or it does not have a location. |
206 void OutputSourceOfDep(const ParseNode* origin, std::ostream& out) { | 311 void OutputSourceOfDep(const ParseNode* origin, std::ostream& out) { |
207 if (!origin) | 312 if (!origin) |
208 return; | 313 return; |
209 Location location = origin->GetRange().begin(); | 314 Location location = origin->GetRange().begin(); |
210 out << " (Added by " + location.file()->name().value() << ":" | 315 out << " (Added by " + location.file()->name().value() << ":" |
211 << location.line_number() << ")\n"; | 316 << location.line_number() << ")\n"; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 const char kDesc_Help[] = | 378 const char kDesc_Help[] = |
274 "gn desc <target label> [<what to show>] [--blame] [--all | --tree]\n" | 379 "gn desc <target label> [<what to show>] [--blame] [--all | --tree]\n" |
275 " Displays information about a given labeled target.\n" | 380 " Displays information about a given labeled target.\n" |
276 "\n" | 381 "\n" |
277 "Possibilities for <what to show>:\n" | 382 "Possibilities for <what to show>:\n" |
278 " (If unspecified an overall summary will be displayed.)\n" | 383 " (If unspecified an overall summary will be displayed.)\n" |
279 "\n" | 384 "\n" |
280 " sources\n" | 385 " sources\n" |
281 " Source files.\n" | 386 " Source files.\n" |
282 "\n" | 387 "\n" |
| 388 " inputs\n" |
| 389 " Additional input dependencies.\n" |
| 390 "\n" |
283 " public\n" | 391 " public\n" |
284 " Public header files.\n" | 392 " Public header files.\n" |
285 "\n" | 393 "\n" |
286 " visibility\n" | 394 " visibility\n" |
287 " Prints which targets can depend on this one.\n" | 395 " Prints which targets can depend on this one.\n" |
288 "\n" | 396 "\n" |
289 " configs\n" | 397 " configs\n" |
290 " Shows configs applied to the given target, sorted in the order\n" | 398 " Shows configs applied to the given target, sorted in the order\n" |
291 " they're specified. This includes both configs specified in the\n" | 399 " they're specified. This includes both configs specified in the\n" |
292 " \"configs\" variable, as well as configs pushed onto this target\n" | 400 " \"configs\" variable, as well as configs pushed onto this target\n" |
293 " via dependencies specifying \"all\" or \"direct\" dependent\n" | 401 " via dependencies specifying \"all\" or \"direct\" dependent\n" |
294 " configs.\n" | 402 " configs.\n" |
295 "\n" | 403 "\n" |
296 " deps [--all | --tree]\n" | 404 " deps [--all | --tree]\n" |
297 " Show immediate (or, when \"--all\" or \"--tree\" is specified,\n" | 405 " Show immediate (or, when \"--all\" or \"--tree\" is specified,\n" |
298 " recursive) dependencies of the given target. \"--tree\" shows them\n" | 406 " recursive) dependencies of the given target. \"--tree\" shows them\n" |
299 " in a tree format. Otherwise, they will be sorted alphabetically.\n" | 407 " in a tree format. Otherwise, they will be sorted alphabetically.\n" |
300 " Both \"deps\" and \"datadeps\" will be included.\n" | 408 " Both \"deps\" and \"datadeps\" will be included.\n" |
301 "\n" | 409 "\n" |
| 410 " direct_dependent_configs\n" |
| 411 " all_dependent_configs\n" |
| 412 " Shows the labels of configs applied to targets that depend on this\n" |
| 413 " one (either directly or all of them).\n" |
| 414 "\n" |
| 415 " forward_dependent_configs_from\n" |
| 416 " Shows the labels of dependencies for which dependent configs will\n" |
| 417 " be pushed to targets depending on the current one.\n" |
| 418 "\n" |
| 419 " script\n" |
| 420 " args\n" |
| 421 " depfile\n" |
| 422 " Actions only. The script and related values.\n" |
| 423 "\n" |
| 424 " outputs\n" |
| 425 " Outputs for script and copy target types.\n" |
| 426 "\n" |
302 " defines [--blame]\n" | 427 " defines [--blame]\n" |
303 " include_dirs [--blame]\n" | 428 " include_dirs [--blame]\n" |
304 " cflags [--blame]\n" | 429 " cflags [--blame]\n" |
305 " cflags_cc [--blame]\n" | 430 " cflags_cc [--blame]\n" |
306 " cflags_cxx [--blame]\n" | 431 " cflags_cxx [--blame]\n" |
307 " ldflags [--blame]\n" | 432 " ldflags [--blame]\n" |
308 " lib_dirs\n" | 433 " lib_dirs\n" |
309 " libs\n" | 434 " libs\n" |
310 " Shows the given values taken from the target and all configs\n" | 435 " Shows the given values taken from the target and all configs\n" |
311 " applying. See \"--blame\" below.\n" | 436 " applying. See \"--blame\" below.\n" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 return 1; | 475 return 1; |
351 | 476 |
352 #define CONFIG_VALUE_HANDLER(name, type) \ | 477 #define CONFIG_VALUE_HANDLER(name, type) \ |
353 } else if (what == #name) { OUTPUT_CONFIG_VALUE(name, type) | 478 } else if (what == #name) { OUTPUT_CONFIG_VALUE(name, type) |
354 | 479 |
355 if (args.size() == 2) { | 480 if (args.size() == 2) { |
356 // User specified one thing to display. | 481 // User specified one thing to display. |
357 const std::string& what = args[1]; | 482 const std::string& what = args[1]; |
358 if (what == "configs") { | 483 if (what == "configs") { |
359 PrintConfigs(target, false); | 484 PrintConfigs(target, false); |
| 485 } else if (what == "direct_dependent_configs") { |
| 486 PrintDirectDependentConfigs(target, false); |
| 487 } else if (what == "all_dependent_configs") { |
| 488 PrintAllDependentConfigs(target, false); |
| 489 } else if (what == "forward_dependent_configs_from") { |
| 490 PrintForwardDependentConfigsFrom(target, false); |
360 } else if (what == "sources") { | 491 } else if (what == "sources") { |
361 PrintSources(target, false); | 492 PrintSources(target, false); |
362 } else if (what == "public") { | 493 } else if (what == "public") { |
363 PrintPublic(target, false); | 494 PrintPublic(target, false); |
364 } else if (what == "visibility") { | 495 } else if (what == "visibility") { |
365 PrintVisibility(target, false); | 496 PrintVisibility(target, false); |
| 497 } else if (what == "inputs") { |
| 498 PrintInputs(target, false); |
| 499 } else if (what == "script") { |
| 500 PrintScript(target, false); |
| 501 } else if (what == "args") { |
| 502 PrintArgs(target, false); |
| 503 } else if (what == "depfile") { |
| 504 PrintDepfile(target, false); |
| 505 } else if (what == "outputs") { |
| 506 PrintOutputs(target, false); |
366 } else if (what == "deps") { | 507 } else if (what == "deps") { |
367 PrintDeps(target, false); | 508 PrintDeps(target, false); |
368 } else if (what == "lib_dirs") { | 509 } else if (what == "lib_dirs") { |
369 PrintLibDirs(target, false); | 510 PrintLibDirs(target, false); |
370 } else if (what == "libs") { | 511 } else if (what == "libs") { |
371 PrintLibs(target, false); | 512 PrintLibs(target, false); |
372 | 513 |
373 CONFIG_VALUE_HANDLER(defines, std::string) | 514 CONFIG_VALUE_HANDLER(defines, std::string) |
374 CONFIG_VALUE_HANDLER(include_dirs, SourceDir) | 515 CONFIG_VALUE_HANDLER(include_dirs, SourceDir) |
375 CONFIG_VALUE_HANDLER(cflags, std::string) | 516 CONFIG_VALUE_HANDLER(cflags, std::string) |
376 CONFIG_VALUE_HANDLER(cflags_c, std::string) | 517 CONFIG_VALUE_HANDLER(cflags_c, std::string) |
377 CONFIG_VALUE_HANDLER(cflags_cc, std::string) | 518 CONFIG_VALUE_HANDLER(cflags_cc, std::string) |
378 CONFIG_VALUE_HANDLER(cflags_objc, std::string) | 519 CONFIG_VALUE_HANDLER(cflags_objc, std::string) |
379 CONFIG_VALUE_HANDLER(cflags_objcc, std::string) | 520 CONFIG_VALUE_HANDLER(cflags_objcc, std::string) |
380 CONFIG_VALUE_HANDLER(ldflags, std::string) | 521 CONFIG_VALUE_HANDLER(ldflags, std::string) |
381 | 522 |
382 } else { | 523 } else { |
383 OutputString("Don't know how to display \"" + what + "\".\n"); | 524 OutputString("Don't know how to display \"" + what + "\".\n"); |
384 return 1; | 525 return 1; |
385 } | 526 } |
386 | 527 |
387 #undef CONFIG_VALUE_HANDLER | 528 #undef CONFIG_VALUE_HANDLER |
388 return 0; | 529 return 0; |
389 } | 530 } |
390 | 531 |
391 // Display summary. | 532 // Display summary. |
392 | 533 |
| 534 // Display this only applicable to binary targets. |
| 535 bool is_binary_output = |
| 536 target->output_type() != Target::GROUP && |
| 537 target->output_type() != Target::COPY_FILES && |
| 538 target->output_type() != Target::ACTION && |
| 539 target->output_type() != Target::ACTION_FOREACH; |
| 540 |
393 // Generally we only want to display toolchains on labels when the toolchain | 541 // Generally we only want to display toolchains on labels when the toolchain |
394 // is different than the default one for this target (which we always print | 542 // is different than the default one for this target (which we always print |
395 // in the header). | 543 // in the header). |
396 Label target_toolchain = target->label().GetToolchainLabel(); | 544 Label target_toolchain = target->label().GetToolchainLabel(); |
397 | 545 |
398 // Header. | 546 // Header. |
399 OutputString("Target: ", DECORATION_YELLOW); | 547 OutputString("Target: ", DECORATION_YELLOW); |
400 OutputString(target->label().GetUserVisibleName(false) + "\n"); | 548 OutputString(target->label().GetUserVisibleName(false) + "\n"); |
401 OutputString("Type: ", DECORATION_YELLOW); | 549 OutputString("Type: ", DECORATION_YELLOW); |
402 OutputString(std::string( | 550 OutputString(std::string( |
403 Target::GetStringForOutputType(target->output_type())) + "\n"); | 551 Target::GetStringForOutputType(target->output_type())) + "\n"); |
404 OutputString("Toolchain: ", DECORATION_YELLOW); | 552 OutputString("Toolchain: ", DECORATION_YELLOW); |
405 OutputString(target_toolchain.GetUserVisibleName(false) + "\n"); | 553 OutputString(target_toolchain.GetUserVisibleName(false) + "\n"); |
406 | 554 |
407 PrintSources(target, true); | 555 PrintSources(target, true); |
408 PrintPublic(target, true); | 556 if (is_binary_output) |
| 557 PrintPublic(target, true); |
409 PrintVisibility(target, true); | 558 PrintVisibility(target, true); |
410 PrintConfigs(target, true); | 559 if (is_binary_output) |
| 560 PrintConfigs(target, true); |
411 | 561 |
412 OUTPUT_CONFIG_VALUE(defines, std::string) | 562 PrintDirectDependentConfigs(target, true); |
413 OUTPUT_CONFIG_VALUE(include_dirs, SourceDir) | 563 PrintAllDependentConfigs(target, true); |
414 OUTPUT_CONFIG_VALUE(cflags, std::string) | 564 PrintForwardDependentConfigsFrom(target, true); |
415 OUTPUT_CONFIG_VALUE(cflags_c, std::string) | 565 |
416 OUTPUT_CONFIG_VALUE(cflags_cc, std::string) | 566 PrintInputs(target, true); |
417 OUTPUT_CONFIG_VALUE(cflags_objc, std::string) | 567 |
418 OUTPUT_CONFIG_VALUE(cflags_objcc, std::string) | 568 if (is_binary_output) { |
419 OUTPUT_CONFIG_VALUE(ldflags, std::string) | 569 OUTPUT_CONFIG_VALUE(defines, std::string) |
| 570 OUTPUT_CONFIG_VALUE(include_dirs, SourceDir) |
| 571 OUTPUT_CONFIG_VALUE(cflags, std::string) |
| 572 OUTPUT_CONFIG_VALUE(cflags_c, std::string) |
| 573 OUTPUT_CONFIG_VALUE(cflags_cc, std::string) |
| 574 OUTPUT_CONFIG_VALUE(cflags_objc, std::string) |
| 575 OUTPUT_CONFIG_VALUE(cflags_objcc, std::string) |
| 576 OUTPUT_CONFIG_VALUE(ldflags, std::string) |
| 577 } |
| 578 |
| 579 if (target->output_type() == Target::ACTION || |
| 580 target->output_type() == Target::ACTION_FOREACH) { |
| 581 PrintScript(target, true); |
| 582 PrintArgs(target, true); |
| 583 PrintDepfile(target, true); |
| 584 } |
| 585 |
| 586 if (target->output_type() == Target::ACTION || |
| 587 target->output_type() == Target::ACTION_FOREACH || |
| 588 target->output_type() == Target::COPY_FILES) { |
| 589 PrintOutputs(target, true); |
| 590 } |
| 591 |
| 592 // Libs can be part of any target and get recursively pushed up the chain, |
| 593 // so always display them, even for groups and such. |
420 PrintLibs(target, true); | 594 PrintLibs(target, true); |
421 PrintLibDirs(target, true); | 595 PrintLibDirs(target, true); |
422 | 596 |
423 PrintDeps(target, true); | 597 PrintDeps(target, true); |
424 | 598 |
425 return 0; | 599 return 0; |
426 } | 600 } |
427 | 601 |
428 } // namespace commands | 602 } // namespace commands |
OLD | NEW |