Lines Matching defs:name
183 ### <a name="cmd_analyze"></a>**gn analyze <out_dir> <input_path> <output_path>**
259 ### <a name="cmd_args"></a>**gn args**: (command-line tool)
270 #### **Usage**
325 #### **Examples**
348 …cmd_check"></a>**gn check <out_dir> [<label_pattern>] [\--force] [\--check-generated]**
363 #### **Command-specific switches**
388 #### **What gets checked**
447 #### **Advice on fixing problems**
474 #### **Examples**
486 ### <a name="cmd_clean"></a>**gn clean <out_dir>...**
492 ### <a name="cmd_clean_stale"></a>**gn clean_stale [\--ninja-executable=...] <out_dir>...**
504 #### **Options**
510 ### <a name="cmd_desc"></a>**gn desc**
524 #### **Possibilities for <what to show>**
572 #### **Shared flags**
587 #### **Target flags**
598 #### **Configs**
608 #### **Printing outputs**
616 #### **Printing deps**
659 #### **Note**
668 #### **Examples**
682 …# <a name="cmd_format"></a>**gn format [\--dump-tree] (\--stdin | <list of build_files...>)**
698 #### **Arguments**
723 #### **Examples**
731 ### <a name="cmd_gen"></a>**gn gen [\--check] [<ide options>] <out_dir>**
749 #### **General options**
766 #### **IDE options**
793 #### **Visual Studio Flags**
817 #### **Xcode Flags**
842 #### **QtCreator Flags**
851 #### **Eclipse IDE Support**
863 #### **Generic JSON Output**
884 #### **Compilation Database**
909 ### <a name="cmd_help"></a>**gn help <anything>**
918 #### **Switches**
925 #### **Example**
931 …e="cmd_ls"></a>**gn ls <out_dir> [<label_pattern>] [\--default-toolchain] [\--as=...]**
944 #### **Options**
978 #### **Examples**
999 ### <a name="cmd_meta"></a>**gn meta**
1011 #### **Arguments**
1037 #### **Examples**
1057 ### <a name="cmd_outputs"></a>**gn outputs <out_dir> <list of target or file names...>**
1074 #### **Target outputs**
1085 #### **File outputs**
1099 #### **Example**
1111 ### <a name="cmd_path"></a>**gn path <out_dir> <target_one> <target_two>**
1126 #### **Interesting paths**
1135 #### **Options**
1151 #### **Example**
1156 ### <a name="cmd_refs"></a>**gn refs**
1185 #### **Options**
1240 #### **Examples (target input)**
1264 #### **Examples (file input)**
1285 ### <a name="func_action"></a>**action**: Declare a target that runs a script a single time.
1293 #### **Inputs**
1329 #### **Outputs**
1351 #### **File name handling**
1360 #### **Variables**
1371 #### **Example**
1388 …nc_action_foreach"></a>**action_foreach**: Declare a target that runs a script over a set of files.
1396 #### **Inputs**
1424 #### **Outputs**
1443 #### **File name handling**
1452 #### **Variables**
1462 #### **Example**
1489 ### <a name="func_bundle_data"></a>**bundle_data**: [iOS/macOS] Declare a target without output.
1507 #### **Variables**
1514 #### **Examples**
1543 ### <a name="func_copy"></a>**copy**: Declare a target that copies files.
1545 #### **File name handling**
1562 #### **Examples**
1580 ### <a name="func_create_bundle"></a>**create_bundle**: [ios/macOS] Build an iOS or macOS bundle.
1603 #### **Code signing**
1621 #### **Variables**
1631 #### **Example**
1730 ### <a name="func_executable"></a>**executable**: Declare an executable target.
1732 #### **Language and compilation**
1742 #### **Variables**
1756 ### <a name="func_generated_file"></a>**generated_file**: Declare a generated_file target.
1780 #### **Example (metadata collection)**
1878 #### **Variables**
1889 ### <a name="func_group"></a>**group**: Declare a named group of targets.
1897 #### **Variables**
1904 #### **Example**
1914 ### <a name="func_loadable_module"></a>**loadable_module**: Declare a loadable module target.
1926 #### **Language and compilation**
1936 #### **Variables**
1950 ### <a name="func_rust_library"></a>**rust_library**: Declare a Rust library target.
1958 #### **Language and compilation**
1968 #### **Variables**
1982 ### <a name="func_rust_proc_macro"></a>**rust_proc_macro**: Declare a Rust procedural macro target.
1993 #### **Language and compilation**
2003 #### **Variables**
2017 ### <a name="func_shared_library"></a>**shared_library**: Declare a shared library target.
2027 #### **Language and compilation**
2037 #### **Variables**
2051 ### <a name="func_source_set"></a>**source_set**: Declare a source set target.
2057 #### **C-language source_sets**
2082 #### **Variables**
2095 ### <a name="func_static_library"></a>**static_library**: Declare a static library target.
2105 #### **Variables**
2126 ### <a name="func_target"></a>**target**: Declare an target with the given programmatic type.
2145 #### **Example**
2160 ### <a name="func_assert"></a>**assert**: Assert an expression is true at generation time.
2170 #### **Examples**
2176 ### <a name="func_config"></a>**config**: Defines a configuration object.
2197 #### **More background**
2215 #### **Variables valid in a config definition**
2226 #### **Variables on a target used to apply configs**
2232 #### **Example**
2244 ### <a name="func_declare_args"></a>**declare_args**: Declare build arguments.
2292 #### **Example**
2305 ### <a name="func_defined"></a>**defined**: Returns whether an identifier is defined.
2323 #### **Example**
2339 …# <a name="func_exec_script"></a>**exec_script**: Synchronously run a script and return the output.
2361 #### **Arguments**:
2388 #### **Example**
2399 …# <a name="func_filter_exclude"></a>**filter_exclude**: Remove values that match a set of patterns.
2411 #### **Examples**
2417 …me="func_filter_include"></a>**filter_include**: Remove values that do not match a set of patterns.
2429 #### **Examples**
2435 ### <a name="func_foreach"></a>**foreach**: Iterate over a list.
2456 #### **Example**
2469 …nc_forward_variables_from"></a>**forward_variables_from**: Copies variables from a different scope.
2499 #### **Examples**
2547 ### <a name="func_get_label_info"></a>**get_label_info**: Get an attribute from a target's label.
2559 #### **Possible values for the "what" parameter**
2602 #### **Examples**
2611 ### <a name="func_get_path_info"></a>**get_path_info**: Extract parts of a file or directory name.
2621 #### **Possible values for the "what" parameter**
2679 #### **Examples**
2691 …_get_target_outputs"></a>**get_target_outputs**: [file list] Get the list of outputs from a target.
2708 #### **Return value**
2728 #### **Example**
2742 ### <a name="func_getenv"></a>**getenv**: Get an environment variable.
2757 #### **Example**
2762 ### <a name="func_import"></a>**import**: Import a file into the current scope.
2789 #### **Examples**
2797 ### <a name="func_not_needed"></a>**not_needed**: Mark variables from scope as not needed.
2810 #### **Example**
2818 ### <a name="func_pool"></a>**pool**: Defines a pool object.
2839 #### **Variables**
2846 #### **Example**
2862 ### <a name="func_print"></a>**print**: Prints to the console.
2875 #### **Examples**
2882 …c_process_file_template"></a>**process_file_template**: Do template expansion over a list of files.
2897 #### **Arguments**
2909 #### **Example**
2927 ### <a name="func_read_file"></a>**read_file**: Read a file into a variable.
2936 #### **Arguments**
2946 #### **Example**
2951 ### <a name="func_rebase_path"></a>**rebase_path**: Rebase a file or directory to another location.
2978 #### **Arguments**
3002 #### **Return value**
3017 #### **Example**
3047 …a name="func_set_default_toolchain"></a>**set_default_toolchain**: Sets the default toolchain name.
3068 #### **Argument**
3075 #### **Example**
3087 ### <a name="func_set_defaults"></a>**set_defaults**: Set default values for a target type.
3108 #### **Example**
3121 ### <a name="func_split_list"></a>**split_list**: Splits a list into N different sub-lists.
3134 #### **Example**
3144 ### <a name="func_string_join"></a>**string_join**: Concatenates a list of strings with a separator.
3152 #### **Examples**
3160 ### <a name="func_string_replace"></a>**string_replace**: Replaces substring in the given string.
3171 #### **Example**
3181 ### <a name="func_string_split"></a>**string_split**: Split string into a list of strings.
3193 #### **Examples without a separator (split on whitespace)**:
3201 #### **Examples with a separator (split on separators)**:
3208 ### <a name="func_template"></a>**template**: Define a template rule.
3222 #### **Variables and templates**:
3253 #### **Target naming**
3280 #### **Overriding builtin targets**
3296 #### **Example of defining a template**
3351 #### **Example of invoking the resulting template**
3371 ### <a name="func_tool"></a>**tool**: Specify arguments to a toolchain tool.
3373 #### **Usage**
3381 #### **Tool types**
3417 #### **Tool variables**
3698 #### **Expansions for tool variables**
3945 #### **Separate linking and dependencies for shared libraries**
3978 #### **Example**
3998 ### <a name="func_toolchain"></a>**toolchain**: Defines a toolchain.
4005 #### **Toolchain overview**
4044 #### **Functions and variables**
4101 #### **Example of defining a toolchain**
4129 #### **Example of cross-toolchain dependencies**
4152 ### <a name="func_write_file"></a>**write_file**: Write a file to disk.
4169 #### **Arguments**
4183 …<a name="var_current_cpu"></a>**current_cpu**: The processor architecture of the current toolchain.
4197 ### <a name="var_current_os"></a>**current_os**: The operating system of the current toolchain.
4211 ### <a name="var_current_toolchain"></a>**current_toolchain**: Label of the current toolchain.
4219 #### **Example**
4226 …<a name="var_default_toolchain"></a>**default_toolchain**: [string] Label of the default toolchain.
4232 ### <a name="var_gn_version"></a>**gn_version**: [number] The version of gn.
4238 #### **Example**
4243 ### <a name="var_host_cpu"></a>**host_cpu**: The processor architecture that GN is running on.
4255 #### **Some possible values**
4261 ### <a name="var_host_os"></a>**host_os**: [string] The operating system that GN is running on.
4271 #### **Some possible values**
4278 ### <a name="var_invoker"></a>**invoker**: [string] The invoking scope inside a template.
4295 #### **Example**
4309 ### <a name="var_python_path"></a>**python_path**: Absolute path of Python.
4316 … name="var_root_build_dir"></a>**root_build_dir**: [string] Directory where build commands are run.
4325 ### <a name="var_root_gen_dir"></a>**root_gen_dir**: Directory for the toolchain's generated files.
4340 …a name="var_root_out_dir"></a>**root_out_dir**: [string] Root directory for toolchain output files.
4358 #### **Example**
4366 ### <a name="var_target_cpu"></a>**target_cpu**: The desired cpu architecture for the build.
4386 #### **Possible values**
4402 ### <a name="var_target_gen_dir"></a>**target_gen_dir**: Directory for a target's generated files.
4418 #### **Example**
4426 ### <a name="var_target_name"></a>**target_name**: [string] The name of the current target.
4447 #### **Example**
4465 ### <a name="var_target_os"></a>**target_os**: The desired operating system for the build.
4495 #### **Possible values**
4506 ### <a name="var_target_out_dir"></a>**target_out_dir**: [string] Directory for target output files.
4521 #### **Example**
4531 ### <a name="var_aliased_deps"></a>**aliased_deps**: [scope] Set of crate-dependency pairs.
4561 …name="var_all_dependent_configs"></a>**all_dependent_configs**: Configs to be forced on dependents.
4580 #### **Ordering of flags and values**
4597 …"var_allow_circular_includes_from"></a>**allow_circular_includes_from**: Permit includes from deps.
4611 #### **Details**
4632 #### **Danger**
4651 #### **Example**
4670 ### <a name="var_arflags"></a>**arflags**: Arguments passed to static_library archiver.
4686 #### **Ordering of flags and values**
4703 ### <a name="var_args"></a>**args**: (target variable) Arguments passed to an action.
4720 ### <a name="var_asmflags"></a>**asmflags**: Flags passed to the assembler.
4729 #### **Ordering of flags and values**
4746 ### <a name="var_assert_no_deps"></a>**assert_no_deps**: Ensure no deps on these targets.
4774 #### **Example**
4786 …ame="var_bridge_header"></a>**bridge_header**: [string] Path to C/Objective-C compatibility header.
4794 …name="var_bundle_contents_dir"></a>**bundle_contents_dir**: Expansion of {{bundle_contents_dir}} in
4806 …undle_deps_filter"></a>**bundle_deps_filter**: [label list] A list of labels that are filtered out.
4822 #### **Example**
4837 ### <a name="var_bundle_executable_dir"></a>**bundle_executable_dir**
4851 ### <a name="var_bundle_resources_dir"></a>**bundle_resources_dir**
4865 …e="var_bundle_root_dir"></a>**bundle_root_dir**: Expansion of {{bundle_root_dir}} in create_bundle.
4875 #### **Example**
4891 ### <a name="var_cflags"></a>**cflags***: Flags passed to the C compiler.
4908 #### **Ordering of flags and values**
4925 ### <a name="var_cflags_c"></a>**cflags***: Flags passed to the C compiler.
4942 #### **Ordering of flags and values**
4959 ### <a name="var_cflags_cc"></a>**cflags***: Flags passed to the C compiler.
4976 #### **Ordering of flags and values**
4993 ### <a name="var_cflags_objc"></a>**cflags***: Flags passed to the C compiler.
5010 #### **Ordering of flags and values**
5027 ### <a name="var_cflags_objcc"></a>**cflags***: Flags passed to the C compiler.
5044 #### **Ordering of flags and values**
5061 …ar_check_includes"></a>**check_includes**: [boolean] Controls whether a target's files are checked.
5080 #### **Example**
5089 …ode_signing_args"></a>**code_signing_args**: [string list] Arguments passed to code signing script.
5098 …code_signing_outputs"></a>**code_signing_outputs**: [file list] Output files for code signing step.
5106 …a name="var_code_signing_script"></a>**code_signing_script**: [file name] Script for code signing."
5114 …"var_code_signing_sources"></a>**code_signing_sources**: [file list] Sources for code signing step.
5123 …r_complete_static_lib"></a>**complete_static_lib**: [boolean] Links all deps into a static library.
5150 #### **Example**
5158 ### <a name="var_configs"></a>**configs**: Configs applying to this target or config.
5164 #### **Configs on a target**
5182 #### **Configs on a config**
5206 #### **Ordering of flags and values**
5224 #### **Example**
5251 ### <a name="var_contents"></a>**contents**: Contents to write to file.
5257 ### <a name="var_crate_name"></a>**crate_name**: [string] The name for the compiled crate.
5265 …<a name="var_crate_root"></a>**crate_root**: [string] The root source file for a binary or library.
5278 … name="var_crate_type"></a>**crate_type**: [string] The type of linkage to use on a shared_library.
5298 ### <a name="var_data"></a>**data**: Runtime data file dependencies.
5327 ### <a name="var_data_deps"></a>**data_deps**: Non-linked dependencies.
5345 #### **Example**
5353 ### <a name="var_data_keys"></a>**data_keys**: Keys from which to collect metadata.
5362 ### <a name="var_defines"></a>**defines**: C preprocessor defines.
5371 #### **Ordering of flags and values**
5389 #### **Example**
5394 ### <a name="var_depfile"></a>**depfile**: [string] File name for input dependencies for actions.
5418 #### **Example**
5433 ### <a name="var_deps"></a>**deps**: Private linked dependencies.
5444 #### **Details of dependency propagation**
5466 ### <a name="var_externs"></a>**externs**: [scope] Set of Rust crate-dependency pairs.
5476 #### **Examples**
5490 …r_framework_dirs"></a>**framework_dirs**: [directory list] Additional framework search directories.
5499 #### **Ordering of flags and values**
5517 #### **Example**
5522 ### <a name="var_frameworks"></a>**frameworks**: [name list] Name of frameworks that must be linked.
5531 #### **Ordering of flags and values**
5549 #### **Example**
5554 ### <a name="var_friend"></a>**friend**: Allow targets to include private headers.
5581 #### **Example**
5615 … <a name="var_gen_deps"></a>**gen_deps**: Declares targets that should generate when this one does.
5627 ### <a name="var_include_dirs"></a>**include_dirs**: Additional include directories.
5636 #### **Ordering of flags and values**
5654 #### **Example**
5659 ### <a name="var_inputs"></a>**inputs**: Additional compile-time dependencies.
5669 #### **Inputs for actions**
5690 #### **Script input gotchas**
5707 #### **Inputs for binary targets**
5721 #### **Example**
5729 ### <a name="var_ldflags"></a>**ldflags**: Flags passed to the linker.
5744 #### **Ordering of flags and values**
5761 ### <a name="var_lib_dirs"></a>**lib_dirs**: Additional library directories.
5777 #### **Ordering of flags and values**
5799 #### **Example**
5804 ### <a name="var_libs"></a>**libs**: Additional libraries to link.
5819 #### **Types of libs**
5840 #### **Ordering of flags and values**
5862 #### **Examples**
5871 ### <a name="var_metadata"></a>**metadata**: Metadata of this target.
5884 #### **Example**
5896 ### <a name="var_module_name"></a>**module_name**: [string] The name for the compiled module.
5903 … <a name="var_output_conversion"></a>**output_conversion**: Data format for generated_file targets.
5909 ### <a name="var_output_dir"></a>**output_dir**: [directory] Directory to put output file in.
5928 #### **Example**
5936 …name="var_output_extension"></a>**output_extension**: Value to use for the output's file extension.
5952 #### **Example**
5972 …me="var_output_name"></a>**output_name**: Define a name for the output file other than the default.
5991 #### **Example**
5998 …name="var_output_prefix_override"></a>**output_prefix_override**: Don't use prefix for output name.
6012 #### **Example**
6022 ### <a name="var_outputs"></a>**outputs**: Output files for actions and copy targets.
6045 …_partial_info_plist"></a>**partial_info_plist**: [filename] Path plist from asset catalog compiler.
6055 ### <a name="var_pool"></a>**pool**: Label of the pool used by the action.
6062 #### **Example**
6070 ### <a name="var_precompiled_header"></a>**precompiled_header**: [string] Header file to precompile.
6088 #### **GCC precompiled headers**
6099 #### **MSVC precompiled headers**
6138 ### <a name="var_precompiled_header_type"></a>**precompiled_header_type**: [string] "gcc" or "msvc".
6143 …<a name="var_precompiled_source"></a>**precompiled_source**: [file name] Source file to precompile.
6150 ### <a name="var_product_type"></a>**product_type**: Product type for Xcode projects.
6159 ### <a name="var_public"></a>**public**: Declare public header files for a target.
6202 #### **Examples**
6212 ### <a name="var_public_configs"></a>**public_configs**: Configs to be applied on dependents.
6225 #### **Propagation of public configs**
6264 #### **Avoiding applying public configs to this target**
6286 #### **Ordering of flags and values**
6303 ### <a name="var_public_deps"></a>**public_deps**: Declare public dependencies.
6325 #### **Discussion**
6340 #### **Example**
6354 ### <a name="var_rebase"></a>**rebase**: Rebase collected metadata as files.
6370 …ar_response_file_contents"></a>**response_file_contents**: Contents of a response file for actions.
6390 #### **Example**
6408 ### <a name="var_script"></a>**script**: Script file for actions.
6415 ### <a name="var_sources"></a>**sources**: Source files for a target
6422 #### **Sources for binary targets**
6443 #### **Sources for non-binary targets**
6457 ### <a name="var_swiftflags"></a>**swiftflags**: Flags passed to the swift compiler.
6466 #### **Ordering of flags and values**
6483 ### <a name="var_testonly"></a>**testonly**: Declares a target must only be used for testing.
6496 #### **Example**
6504 ### <a name="var_visibility"></a>**visibility**: A list of labels that can depend on a target.
6522 #### **Patterns**
6531 #### **Examples**
6559 ### <a name="var_walk_keys"></a>**walk_keys**: Key(s) for managing the metadata collection walk.
6573 …_weak_frameworks"></a>**weak_frameworks**: [name list] Name of frameworks that must be weak linked.
6586 #### **Ordering of flags and values**
6604 #### **Example**
6609 …write_runtime_deps"></a>**write_runtime_deps**: Writes the target's runtime_deps to the given path.
6629 …ame="var_xcasset_compiler_flags"></a>**xcasset_compiler_flags**: Flags passed to xcassets compiler.
6638 …code_extra_attributes"></a>**xcode_extra_attributes**: [scope] Extra attributes for Xcode projects.
6647 …="var_xcode_test_application_name"></a>**xcode_test_application_name**: Name for Xcode test target.
6657 #### **Example**
6667 ### <a name="buildargs"></a>**Build Arguments Overview**
6674 #### **How build arguments are set**
6703 #### **Examples**
6718 #### **How build arguments are used**
6731 ### <a name="dotfile"></a>**.gn file**
6748 #### **Variables**
6858 #### **Example .gn file contents**
6878 ### <a name="execution"></a>**Build graph and execution overview**
6880 #### **Overall build flow**
6908 #### **Executing target definitions and templates**
6935 #### **Which targets are built**
6957 #### **Dependencies**
6971 ### <a name="grammar"></a>**Language and grammar for GN build files**
6973 #### **Tokens**
6981 #### **White space and comments**
6993 #### **Identifiers**
7003 #### **Keywords**
7011 #### **Integer literals**
7021 #### **String literals**
7053 #### **Punctuation**
7064 #### **Grammar**
7101 #### **Types**
7123 #### **Lists**
7155 #### **Scopes**
7198 ### <a name="io_conversion"></a>**Input and output conversion**
7302 ### <a name="file_pattern"></a>**File patterns**
7321 #### **Pattern examples**
7336 ### <a name="label_pattern"></a>**Label patterns**
7372 ### <a name="labels"></a>**About labels**
7391 #### **Toolchains**
7404 #### **Relative labels**
7423 #### **Implicit names**
7432 ### <a name="metadata_collection"></a>**Metadata Collection**
7441 #### **generated_file targets**
7460 #### **Collection and Aggregation**
7559 #### **Common Uses**
7575 ### <a name="ninja_rules"></a>**Ninja build rules**
7577 #### **The "all" and "default" rules**
7588 #### **Phony rules**
7624 ### <a name="nogncheck"></a>**nogncheck**: Skip an include line from checking.
7654 #### **More information**
7661 ### <a name="runtime_deps"></a>**Runtime dependencies**
7675 #### **Executables**
7684 #### **Actions and copies**
7719 #### **Static libraries and source sets**
7730 #### **Multiple outputs**
7737 ### <a name="source_expansion"></a>**How Source Expansion Works**
7758 #### **Placeholders**
7813 #### **(*) Note on directories**
7829 #### **Examples**
7852 ### <a name="switch_list"></a>**Available global switches**