Debian Codegraph @

subprojects/meson-docs/docs/yaml/functions/executable.yaml

raw
1 name: executable
2 returns: exe
3 description: |
4 Creates a new executable. The first argument specifies its name and
5 the remaining positional arguments define the input files to use.
6
7 The lists for the kwargs (such as `sources`, `objects`, and `dependencies`) are
8 always flattened, which means you can freely nest and add lists while
9 creating the final list.
10
11 The returned object also has methods that are documented in [[@exe]].
12
13 *Since 1.3.0* executable names can be the same across multiple targets as
14 long as they each have a different `name_suffix`.
15
16 warnings:
17 - The `link_language` kwarg was broken until 0.55.0
18
19 posargs_inherit: _build_target_base
20 varargs_inherit: _build_target_base
21 kwargs_inherit: _build_target_base
22
23 kwargs:
24 export_dynamic:
25 type: bool
26 since: 0.45.0
27 description: |
28 when set to true causes the target's symbols to be
29 dynamically exported, allowing modules built using the
30 [[shared_module]] function to refer to functions,
31 variables and other symbols defined in the executable itself. Implies
32 the `implib` argument.
33
34 implib:
35 type: bool | str
36 since: 0.42.0
37 description: |
38 When set to true, an import library is generated for the
39 executable (the name of the import library is based on *exe_name*).
40 Alternatively, when set to a string, that gives the base name for
41 the import library. The import library is used when the returned
42 build target object appears in `link_with:` elsewhere. Only has any
43 effect on platforms where that is meaningful (e.g. Windows). Implies
44 the `export_dynamic` argument.
45
46 pie:
47 type: bool
48 since: 0.49.0
49 description: Build a position-independent executable.
50
51 vs_module_defs:
52 type: str | file | custom_tgt | custom_idx
53 since: 1.3.0
54 description: |
55 Specify a Microsoft module definition file for controlling symbol exports,
56 etc., on platforms where that is possible (e.g. Windows).
57
58 This can be used to expose which functions a shared_module loaded by an
59 executable will be allowed to use.