Lines Matching defs:name

182 ### <a name="cmd_analyze"></a>**gn analyze &lt;out_dir&gt; &lt;input_path&gt; &lt;output_path&gt;**
256 ### <a name="cmd_args"></a>**gn args**: (command-line tool)
267 #### **Usage**
322 #### **Examples**
345 …cmd_check"></a>**gn check &lt;out_dir&gt; [&lt;label_pattern&gt;] [\--force] [\--check-generated]**
360 #### **Command-specific switches**
385 #### **What gets checked**
444 #### **Advice on fixing problems**
471 #### **Examples**
483 ### <a name="cmd_clean"></a>**gn clean &lt;out_dir&gt;...**
489 ### <a name="cmd_desc"></a>**gn desc**
503 #### **Possibilities for &lt;what to show&gt;**
551 #### **Shared flags**
566 #### **Target flags**
577 #### **Configs**
587 #### **Printing outputs**
595 #### **Printing deps**
638 #### **Note**
647 #### **Examples**
661 …# <a name="cmd_format"></a>**gn format [\--dump-tree] (\--stdin | &lt;list of build_files...&gt;)**
677 #### **Arguments**
697 #### **Examples**
704 ### <a name="cmd_gen"></a>**gn gen [\--check] [&lt;ide options&gt;] &lt;out_dir&gt;**
722 #### **IDE options**
748 #### **Visual Studio Flags**
769 #### **Xcode Flags**
794 #### **QtCreator Flags**
803 #### **Eclipse IDE Support**
815 #### **Generic JSON Output**
836 #### **Compilation Database**
855 ### <a name="cmd_help"></a>**gn help &lt;anything&gt;**
864 #### **Switches**
871 #### **Example**
877 …e="cmd_ls"></a>**gn ls &lt;out_dir&gt; [&lt;label_pattern&gt;] [\--default-toolchain] [\--as=...]**
890 #### **Options**
924 #### **Examples**
945 ### <a name="cmd_meta"></a>**gn meta**
957 #### **Arguments**
982 #### **Examples**
1002 ### <a name="cmd_outputs"></a>**gn outputs &lt;out_dir&gt; &lt;list of target or file names...&gt;**
1019 #### **Target outputs**
1030 #### **File outputs**
1044 #### **Example**
1056 ### <a name="cmd_path"></a>**gn path &lt;out_dir&gt; &lt;target_one&gt; &lt;target_two&gt;**
1071 #### **Interesting paths**
1080 #### **Options**
1096 #### **Example**
1101 ### <a name="cmd_refs"></a>**gn refs**
1130 #### **Options**
1185 #### **Examples (target input)**
1209 #### **Examples (file input)**
1230 ### <a name="func_action"></a>**action**: Declare a target that runs a script a single time.
1238 #### **Inputs**
1268 #### **Outputs**
1290 #### **File name handling**
1299 #### **Variables**
1307 #### **Example**
1324 …nc_action_foreach"></a>**action_foreach**: Declare a target that runs a script over a set of files.
1332 #### **Inputs**
1360 #### **Outputs**
1379 #### **File name handling**
1388 #### **Variables**
1396 #### **Example**
1423 ### <a name="func_bundle_data"></a>**bundle_data**: [iOS/macOS] Declare a target without output.
1441 #### **Variables**
1448 #### **Examples**
1477 ### <a name="func_copy"></a>**copy**: Declare a target that copies files.
1479 #### **File name handling**
1496 #### **Examples**
1514 ### <a name="func_create_bundle"></a>**create_bundle**: [ios/macOS] Build an iOS or macOS bundle.
1537 #### **Code signing**
1555 #### **Variables**
1565 #### **Example**
1664 ### <a name="func_executable"></a>**executable**: Declare an executable target.
1666 #### **Language and compilation**
1676 #### **Variables**
1690 ### <a name="func_generated_file"></a>**generated_file**: Declare a generated_file target.
1714 #### **Example (metadata collection)**
1812 #### **Variables**
1823 ### <a name="func_group"></a>**group**: Declare a named group of targets.
1831 #### **Variables**
1838 #### **Example**
1848 ### <a name="func_loadable_module"></a>**loadable_module**: Declare a loadable module target.
1860 #### **Language and compilation**
1870 #### **Variables**
1884 ### <a name="func_rust_library"></a>**rust_library**: Declare a Rust library target.
1892 #### **Language and compilation**
1902 #### **Variables**
1916 ### <a name="func_rust_proc_macro"></a>**rust_proc_macro**: Declare a Rust procedural macro target.
1927 #### **Language and compilation**
1937 #### **Variables**
1951 ### <a name="func_shared_library"></a>**shared_library**: Declare a shared library target.
1961 #### **Language and compilation**
1971 #### **Variables**
1985 ### <a name="func_source_set"></a>**source_set**: Declare a source set target.
1991 #### **C-language source_sets**
2016 #### **Variables**
2029 ### <a name="func_static_library"></a>**static_library**: Declare a static library target.
2039 #### **Variables**
2060 ### <a name="func_target"></a>**target**: Declare an target with the given programmatic type.
2079 #### **Example**
2094 ### <a name="func_assert"></a>**assert**: Assert an expression is true at generation time.
2104 #### **Examples**
2110 ### <a name="func_config"></a>**config**: Defines a configuration object.
2131 #### **More background**
2149 #### **Variables valid in a config definition**
2159 #### **Variables on a target used to apply configs**
2165 #### **Example**
2177 ### <a name="func_declare_args"></a>**declare_args**: Declare build arguments.
2225 #### **Example**
2238 ### <a name="func_defined"></a>**defined**: Returns whether an identifier is defined.
2256 #### **Example**
2272 …# <a name="func_exec_script"></a>**exec_script**: Synchronously run a script and return the output.
2294 #### **Arguments**:
2321 #### **Example**
2332 …# <a name="func_filter_exclude"></a>**filter_exclude**: Remove values that match a set of patterns.
2344 #### **Examples**
2350 …me="func_filter_include"></a>**filter_include**: Remove values that do not match a set of patterns.
2362 #### **Examples**
2368 ### <a name="func_foreach"></a>**foreach**: Iterate over a list.
2389 #### **Example**
2402 …nc_forward_variables_from"></a>**forward_variables_from**: Copies variables from a different scope.
2432 #### **Examples**
2480 ### <a name="func_get_label_info"></a>**get_label_info**: Get an attribute from a target's label.
2492 #### **Possible values for the "what" parameter**
2535 #### **Examples**
2544 ### <a name="func_get_path_info"></a>**get_path_info**: Extract parts of a file or directory name.
2554 #### **Possible values for the "what" parameter**
2612 #### **Examples**
2624 …_get_target_outputs"></a>**get_target_outputs**: [file list] Get the list of outputs from a target.
2641 #### **Return value**
2661 #### **Example**
2675 ### <a name="func_getenv"></a>**getenv**: Get an environment variable.
2690 #### **Example**
2695 ### <a name="func_import"></a>**import**: Import a file into the current scope.
2722 #### **Examples**
2730 ### <a name="func_not_needed"></a>**not_needed**: Mark variables from scope as not needed.
2743 #### **Example**
2751 ### <a name="func_pool"></a>**pool**: Defines a pool object.
2772 #### **Variables**
2779 #### **Example**
2795 ### <a name="func_print"></a>**print**: Prints to the console.
2808 #### **Examples**
2815 …c_process_file_template"></a>**process_file_template**: Do template expansion over a list of files.
2830 #### **Arguments**
2842 #### **Example**
2860 ### <a name="func_read_file"></a>**read_file**: Read a file into a variable.
2869 #### **Arguments**
2879 #### **Example**
2884 ### <a name="func_rebase_path"></a>**rebase_path**: Rebase a file or directory to another location.
2911 #### **Arguments**
2935 #### **Return value**
2950 #### **Example**
2980 …a name="func_set_default_toolchain"></a>**set_default_toolchain**: Sets the default toolchain name.
3001 #### **Argument**
3008 #### **Example**
3020 ### <a name="func_set_defaults"></a>**set_defaults**: Set default values for a target type.
3041 #### **Example**
3054 …ame="func_set_sources_assignment_filter"></a>**set_sources_assignment_filter**: Deprecated feature.
3060 ### <a name="func_split_list"></a>**split_list**: Splits a list into N different sub-lists.
3073 #### **Example**
3083 ### <a name="func_string_join"></a>**string_join**: Concatenates a list of strings with a separator.
3091 #### **Examples**
3099 ### <a name="func_string_replace"></a>**string_replace**: Replaces substring in the given string.
3110 #### **Example**
3120 ### <a name="func_string_split"></a>**string_split**: Split string into a list of strings.
3132 #### **Examples without a separator (split on whitespace)**:
3140 #### **Examples with a separator (split on separators)**:
3147 ### <a name="func_template"></a>**template**: Define a template rule.
3161 #### **Variables and templates**:
3192 #### **Target naming**
3219 #### **Overriding builtin targets**
3235 #### **Example of defining a template**
3290 #### **Example of invoking the resulting template**
3310 ### <a name="func_tool"></a>**tool**: Specify arguments to a toolchain tool.
3312 #### **Usage**
3320 #### **Tool types**
3356 #### **Tool variables**
3630 #### **Expansions for tool variables**
3877 #### **Separate linking and dependencies for shared libraries**
3912 #### **Example**
3932 ### <a name="func_toolchain"></a>**toolchain**: Defines a toolchain.
3939 #### **Toolchain overview**
3978 #### **Functions and variables**
4035 #### **Example of defining a toolchain**
4063 #### **Example of cross-toolchain dependencies**
4086 ### <a name="func_write_file"></a>**write_file**: Write a file to disk.
4103 #### **Arguments**
4117 …<a name="var_current_cpu"></a>**current_cpu**: The processor architecture of the current toolchain.
4131 ### <a name="var_current_os"></a>**current_os**: The operating system of the current toolchain.
4145 ### <a name="var_current_toolchain"></a>**current_toolchain**: Label of the current toolchain.
4153 #### **Example**
4160 …<a name="var_default_toolchain"></a>**default_toolchain**: [string] Label of the default toolchain.
4166 ### <a name="var_gn_version"></a>**gn_version**: [number] The version of gn.
4172 #### **Example**
4177 ### <a name="var_host_cpu"></a>**host_cpu**: The processor architecture that GN is running on.
4189 #### **Some possible values**
4195 ### <a name="var_host_os"></a>**host_os**: [string] The operating system that GN is running on.
4205 #### **Some possible values**
4212 ### <a name="var_invoker"></a>**invoker**: [string] The invoking scope inside a template.
4229 #### **Example**
4243 ### <a name="var_python_path"></a>**python_path**: Absolute path of Python.
4250 … name="var_root_build_dir"></a>**root_build_dir**: [string] Directory where build commands are run.
4259 ### <a name="var_root_gen_dir"></a>**root_gen_dir**: Directory for the toolchain's generated files.
4274 …a name="var_root_out_dir"></a>**root_out_dir**: [string] Root directory for toolchain output files.
4292 #### **Example**
4300 ### <a name="var_target_cpu"></a>**target_cpu**: The desired cpu architecture for the build.
4320 #### **Possible values**
4329 ### <a name="var_target_gen_dir"></a>**target_gen_dir**: Directory for a target's generated files.
4345 #### **Example**
4353 ### <a name="var_target_name"></a>**target_name**: [string] The name of the current target.
4374 #### **Example**
4392 ### <a name="var_target_os"></a>**target_os**: The desired operating system for the build.
4422 #### **Possible values**
4433 ### <a name="var_target_out_dir"></a>**target_out_dir**: [string] Directory for target output files.
4448 #### **Example**
4458 ### <a name="var_aliased_deps"></a>**aliased_deps**: [scope] Set of crate-dependency pairs.
4488 …name="var_all_dependent_configs"></a>**all_dependent_configs**: Configs to be forced on dependents.
4507 #### **Ordering of flags and values**
4524 …"var_allow_circular_includes_from"></a>**allow_circular_includes_from**: Permit includes from deps.
4538 #### **Details**
4559 #### **Danger**
4578 #### **Example**
4597 ### <a name="var_arflags"></a>**arflags**: Arguments passed to static_library archiver.
4613 #### **Ordering of flags and values**
4630 ### <a name="var_args"></a>**args**: (target variable) Arguments passed to an action.
4639 ### <a name="var_asmflags"></a>**asmflags**: Flags passed to the assembler.
4648 #### **Ordering of flags and values**
4665 ### <a name="var_assert_no_deps"></a>**assert_no_deps**: Ensure no deps on these targets.
4693 #### **Example**
4705 …ame="var_bridge_header"></a>**bridge_header**: [string] Path to C/Objective-C compatibility header.
4713 …name="var_bundle_contents_dir"></a>**bundle_contents_dir**: Expansion of {{bundle_contents_dir}} in
4725 …undle_deps_filter"></a>**bundle_deps_filter**: [label list] A list of labels that are filtered out.
4741 #### **Example**
4756 ### <a name="var_bundle_executable_dir"></a>**bundle_executable_dir**
4770 ### <a name="var_bundle_resources_dir"></a>**bundle_resources_dir**
4784 …e="var_bundle_root_dir"></a>**bundle_root_dir**: Expansion of {{bundle_root_dir}} in create_bundle.
4794 #### **Example**
4810 ### <a name="var_cflags"></a>**cflags***: Flags passed to the C compiler.
4827 #### **Ordering of flags and values**
4844 ### <a name="var_cflags_c"></a>**cflags***: Flags passed to the C compiler.
4861 #### **Ordering of flags and values**
4878 ### <a name="var_cflags_cc"></a>**cflags***: Flags passed to the C compiler.
4895 #### **Ordering of flags and values**
4912 ### <a name="var_cflags_objc"></a>**cflags***: Flags passed to the C compiler.
4929 #### **Ordering of flags and values**
4946 ### <a name="var_cflags_objcc"></a>**cflags***: Flags passed to the C compiler.
4963 #### **Ordering of flags and values**
4980 …ar_check_includes"></a>**check_includes**: [boolean] Controls whether a target's files are checked.
4999 #### **Example**
5008 …ode_signing_args"></a>**code_signing_args**: [string list] Arguments passed to code signing script.
5017 …code_signing_outputs"></a>**code_signing_outputs**: [file list] Output files for code signing step.
5025 …a name="var_code_signing_script"></a>**code_signing_script**: [file name] Script for code signing."
5033 …"var_code_signing_sources"></a>**code_signing_sources**: [file list] Sources for code signing step.
5042 …r_complete_static_lib"></a>**complete_static_lib**: [boolean] Links all deps into a static library.
5069 #### **Example**
5077 ### <a name="var_configs"></a>**configs**: Configs applying to this target or config.
5083 #### **Configs on a target**
5101 #### **Configs on a config**
5125 #### **Ordering of flags and values**
5143 #### **Example**
5170 ### <a name="var_contents"></a>**contents**: Contents to write to file.
5176 ### <a name="var_crate_name"></a>**crate_name**: [string] The name for the compiled crate.
5184 …<a name="var_crate_root"></a>**crate_root**: [string] The root source file for a binary or library.
5197 … name="var_crate_type"></a>**crate_type**: [string] The type of linkage to use on a shared_library.
5217 ### <a name="var_data"></a>**data**: Runtime data file dependencies.
5246 ### <a name="var_data_deps"></a>**data_deps**: Non-linked dependencies.
5264 #### **Example**
5272 ### <a name="var_data_keys"></a>**data_keys**: Keys from which to collect metadata.
5281 ### <a name="var_defines"></a>**defines**: C preprocessor defines.
5290 #### **Ordering of flags and values**
5308 #### **Example**
5313 ### <a name="var_depfile"></a>**depfile**: [string] File name for input dependencies for actions.
5337 #### **Example**
5352 ### <a name="var_deps"></a>**deps**: Private linked dependencies.
5363 #### **Details of dependency propagation**
5385 ### <a name="var_externs"></a>**externs**: [scope] Set of Rust crate-dependency pairs.
5395 #### **Examples**
5409 …r_framework_dirs"></a>**framework_dirs**: [directory list] Additional framework search directories.
5418 #### **Ordering of flags and values**
5436 #### **Example**
5441 ### <a name="var_frameworks"></a>**frameworks**: [name list] Name of frameworks that must be linked.
5450 #### **Ordering of flags and values**
5468 #### **Example**
5473 ### <a name="var_friend"></a>**friend**: Allow targets to include private headers.
5500 #### **Example**
5534 ### <a name="var_include_dirs"></a>**include_dirs**: Additional include directories.
5543 #### **Ordering of flags and values**
5561 #### **Example**
5566 ### <a name="var_inputs"></a>**inputs**: Additional compile-time dependencies.
5576 #### **Inputs for actions**
5597 #### **Script input gotchas**
5614 #### **Inputs for binary targets**
5628 #### **Example**
5636 ### <a name="var_ldflags"></a>**ldflags**: Flags passed to the linker.
5651 #### **Ordering of flags and values**
5668 ### <a name="var_lib_dirs"></a>**lib_dirs**: Additional library directories.
5684 #### **Ordering of flags and values**
5706 #### **Example**
5711 ### <a name="var_libs"></a>**libs**: Additional libraries to link.
5726 #### **Types of libs**
5747 #### **Ordering of flags and values**
5769 #### **Examples**
5778 ### <a name="var_metadata"></a>**metadata**: Metadata of this target.
5791 #### **Example**
5803 ### <a name="var_module_name"></a>**module_name**: [string] The name for the compiled module.
5810 … <a name="var_output_conversion"></a>**output_conversion**: Data format for generated_file targets.
5816 ### <a name="var_output_dir"></a>**output_dir**: [directory] Directory to put output file in.
5835 #### **Example**
5843 …name="var_output_extension"></a>**output_extension**: Value to use for the output's file extension.
5859 #### **Example**
5879 …me="var_output_name"></a>**output_name**: Define a name for the output file other than the default.
5898 #### **Example**
5905 …name="var_output_prefix_override"></a>**output_prefix_override**: Don't use prefix for output name.
5919 #### **Example**
5929 ### <a name="var_outputs"></a>**outputs**: Output files for actions and copy targets.
5952 …_partial_info_plist"></a>**partial_info_plist**: [filename] Path plist from asset catalog compiler.
5962 ### <a name="var_pool"></a>**pool**: Label of the pool used by the action.
5969 #### **Example**
5977 ### <a name="var_precompiled_header"></a>**precompiled_header**: [string] Header file to precompile.
5995 #### **GCC precompiled headers**
6006 #### **MSVC precompiled headers**
6045 ### <a name="var_precompiled_header_type"></a>**precompiled_header_type**: [string] "gcc" or "msvc".
6050 …<a name="var_precompiled_source"></a>**precompiled_source**: [file name] Source file to precompile.
6057 ### <a name="var_product_type"></a>**product_type**: Product type for Xcode projects.
6066 ### <a name="var_public"></a>**public**: Declare public header files for a target.
6109 #### **Examples**
6119 ### <a name="var_public_configs"></a>**public_configs**: Configs to be applied on dependents.
6132 #### **Propagation of public configs**
6171 #### **Avoiding applying public configs to this target**
6193 #### **Ordering of flags and values**
6210 ### <a name="var_public_deps"></a>**public_deps**: Declare public dependencies.
6232 #### **Discussion**
6247 #### **Example**
6261 ### <a name="var_rebase"></a>**rebase**: Rebase collected metadata as files.
6277 …ar_response_file_contents"></a>**response_file_contents**: Contents of a response file for actions.
6297 #### **Example**
6315 ### <a name="var_script"></a>**script**: Script file for actions.
6322 ### <a name="var_sources"></a>**sources**: Source files for a target
6329 #### **Sources for binary targets**
6350 #### **Sources for non-binary targets**
6364 ### <a name="var_swiftflags"></a>**swiftflags**: Flags passed to the swift compiler.
6373 #### **Ordering of flags and values**
6390 ### <a name="var_testonly"></a>**testonly**: Declares a target must only be used for testing.
6403 #### **Example**
6411 ### <a name="var_visibility"></a>**visibility**: A list of labels that can depend on a target.
6429 #### **Patterns**
6438 #### **Examples**
6466 ### <a name="var_walk_keys"></a>**walk_keys**: Key(s) for managing the metadata collection walk.
6480 …_weak_frameworks"></a>**weak_frameworks**: [name list] Name of frameworks that must be weak linked.
6493 #### **Ordering of flags and values**
6511 #### **Example**
6516 …write_runtime_deps"></a>**write_runtime_deps**: Writes the target's runtime_deps to the given path.
6536 …ame="var_xcasset_compiler_flags"></a>**xcasset_compiler_flags**: Flags passed to xcassets compiler.
6545 …code_extra_attributes"></a>**xcode_extra_attributes**: [scope] Extra attributes for Xcode projects.
6554 …="var_xcode_test_application_name"></a>**xcode_test_application_name**: Name for Xcode test target.
6564 #### **Example**
6574 ### <a name="buildargs"></a>**Build Arguments Overview**
6581 #### **How build arguments are set**
6610 #### **Examples**
6625 #### **How build arguments are used**
6638 ### <a name="dotfile"></a>**.gn file**
6655 #### **Variables**
6762 #### **Example .gn file contents**
6782 ### <a name="execution"></a>**Build graph and execution overview**
6784 #### **Overall build flow**
6812 #### **Executing target definitions and templates**
6839 #### **Which targets are built**
6854 #### **Dependencies**
6868 ### <a name="grammar"></a>**Language and grammar for GN build files**
6870 #### **Tokens**
6878 #### **White space and comments**
6890 #### **Identifiers**
6900 #### **Keywords**
6908 #### **Integer literals**
6918 #### **String literals**
6952 #### **Punctuation**
6963 #### **Grammar**
7000 #### **Types**
7022 #### **Lists**
7054 #### **Scopes**
7092 ### <a name="io_conversion"></a>**Input and output conversion**
7196 ### <a name="file_pattern"></a>**File patterns**
7215 #### **Pattern examples**
7230 ### <a name="label_pattern"></a>**Label patterns**
7266 ### <a name="labels"></a>**About labels**
7285 #### **Toolchains**
7298 #### **Relative labels**
7317 #### **Implicit names**
7326 ### <a name="metadata_collection"></a>**Metadata Collection**
7335 #### **generated_file targets**
7354 #### **Collection and Aggregation**
7453 #### **Common Uses**
7469 ### <a name="ninja_rules"></a>**Ninja build rules**
7471 #### **The "all" and "default" rules**
7482 #### **Phony rules**
7518 ### <a name="nogncheck"></a>**nogncheck**: Skip an include line from checking.
7548 #### **More information**
7555 ### <a name="runtime_deps"></a>**Runtime dependencies**
7569 #### **Executables**
7578 #### **Actions and copies**
7613 #### **Static libraries and source sets**
7624 #### **Multiple outputs**
7631 ### <a name="source_expansion"></a>**How Source Expansion Works**
7652 #### **Placeholders**
7707 #### **(*) Note on directories**
7723 #### **Examples**
7746 ### <a name="switch_list"></a>**Available global switches**