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

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

Issue 1207903002: Windows precompiled header support in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months 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
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 <algorithm> 5 #include <algorithm>
6 #include <limits> 6 #include <limits>
7 7
8 #include "tools/gn/err.h" 8 #include "tools/gn/err.h"
9 #include "tools/gn/functions.h" 9 #include "tools/gn/functions.h"
10 #include "tools/gn/parse_tree.h" 10 #include "tools/gn/parse_tree.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 " Prefix to use for the output name. Defaults to empty. This\n" 496 " Prefix to use for the output name. Defaults to empty. This\n"
497 " prefix will be prepended to the name of the target (or the\n" 497 " prefix will be prepended to the name of the target (or the\n"
498 " output_name if one is manually specified for it) if the prefix\n" 498 " output_name if one is manually specified for it) if the prefix\n"
499 " is not already there. The result will show up in the\n" 499 " is not already there. The result will show up in the\n"
500 " {{output_name}} substitution pattern.\n" 500 " {{output_name}} substitution pattern.\n"
501 "\n" 501 "\n"
502 " This is typically used to prepend \"lib\" to libraries on\n" 502 " This is typically used to prepend \"lib\" to libraries on\n"
503 " Posix systems:\n" 503 " Posix systems:\n"
504 " output_prefix = \"lib\"\n" 504 " output_prefix = \"lib\"\n"
505 "\n" 505 "\n"
506 " precompiled_header_type [string]\n"
507 " Valid for: \"cc\", \"cxx\", \"objc\", \"objcxx\"\n"
508 "\n"
509 " Type of precompiled headers. If undefined or the empty string,\n"
510 " precompiled headers will not be used for this tool. Otherwise\n"
511 " use either \"gcc\" or \"msvc\".\n"
512 "\n"
513 " For precompiled headers to be used for a given target, the\n"
514 " target (or a config applied to it) must also specify a\n"
515 " \"precompiled_header\" and, for \"msvc\"-style headers, a\n"
516 " \"precompiled_source\" value.\n"
517 "\n"
518 " See \"gn help precompiled_header\" for more.\n"
519 "\n"
506 " restat [boolean]\n" 520 " restat [boolean]\n"
507 " Valid for: all tools (optional, defaults to false)\n" 521 " Valid for: all tools (optional, defaults to false)\n"
508 "\n" 522 "\n"
509 " Requests that Ninja check the file timestamp after this tool has\n" 523 " Requests that Ninja check the file timestamp after this tool has\n"
510 " run to determine if anything changed. Set this if your tool has\n" 524 " run to determine if anything changed. Set this if your tool has\n"
511 " the ability to skip writing output if the output file has not\n" 525 " the ability to skip writing output if the output file has not\n"
512 " changed.\n" 526 " changed.\n"
513 "\n" 527 "\n"
514 " Normally, Ninja will assume that when a tool runs the output\n" 528 " Normally, Ninja will assume that when a tool runs the output\n"
515 " be new and downstream dependents must be rebuild. When this is\n" 529 " be new and downstream dependents must be rebuild. When this is\n"
(...skipping 17 matching lines...) Expand all
533 " allows you to get around OS command-line length limits.\n" 547 " allows you to get around OS command-line length limits.\n"
534 "\n" 548 "\n"
535 " This example adds the inputs and libraries to a response file,\n" 549 " This example adds the inputs and libraries to a response file,\n"
536 " but passes the linker flags directly on the command line:\n" 550 " but passes the linker flags directly on the command line:\n"
537 " tool(\"link\") {\n" 551 " tool(\"link\") {\n"
538 " command = \"link -o {{output}} {{ldflags}} @{{output}}.rsp\"\n" 552 " command = \"link -o {{output}} {{ldflags}} @{{output}}.rsp\"\n"
539 " rspfile = \"{{output}}.rsp\"\n" 553 " rspfile = \"{{output}}.rsp\"\n"
540 " rspfile_content = \"{{inputs}} {{solibs}} {{libs}}\"\n" 554 " rspfile_content = \"{{inputs}} {{solibs}} {{libs}}\"\n"
541 " }\n" 555 " }\n"
542 "\n" 556 "\n"
543 "Expansions for tool variables" 557 "Expansions for tool variables\n"
544 "\n" 558 "\n"
545 " All paths are relative to the root build directory, which is the\n" 559 " All paths are relative to the root build directory, which is the\n"
546 " current directory for running all tools. These expansions are\n" 560 " current directory for running all tools. These expansions are\n"
547 " available to all tools:\n" 561 " available to all tools:\n"
548 "\n" 562 "\n"
549 " {{label}}\n" 563 " {{label}}\n"
550 " The label of the current target. This is typically used in the\n" 564 " The label of the current target. This is typically used in the\n"
551 " \"description\" field for link tools. The toolchain will be\n" 565 " \"description\" field for link tools. The toolchain will be\n"
552 " omitted from the label for targets in the default toolchain, and\n" 566 " omitted from the label for targets in the default toolchain, and\n"
553 " will be included for targets in other toolchains.\n" 567 " will be included for targets in other toolchains.\n"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 return Value(); 925 return Value();
912 926
913 Scope::KeyValueMap values; 927 Scope::KeyValueMap values;
914 block_scope.GetCurrentScopeValues(&values); 928 block_scope.GetCurrentScopeValues(&values);
915 toolchain->args() = values; 929 toolchain->args() = values;
916 930
917 return Value(); 931 return Value();
918 } 932 }
919 933
920 } // namespace functions 934 } // namespace functions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698