Debian Codegraph @

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

raw
1 name: library
2 returns: lib
3 description: |
4 Builds a library that is either static, shared or both depending on
5 the value of `default_library`
6 user [option](https://mesonbuild.com/Builtin-options.html).
7 You should use this instead of [[shared_library]],
8 [[static_library]] or
9 [[both_libraries]] most of the time. This allows you
10 to toggle your entire project (including subprojects) from shared to
11 static with only one option. This option applies to libraries being
12 built internal to the entire project. For external dependencies, the
13 default library type preferred is shared. This can be adapted on a per
14 library basis using the [[dependency]] `static` keyword.
15
16 The keyword arguments for this are the same as for
17 [[build_target]]
18
19 warnings:
20 - using <lang>_shared_args and/or <lang>_static_args may lead to much higher
21 compilation times with both_library, as object files cannot be shared between
22 the static and shared targets. It is guaranteed to not duplicate the build if
23 these arguments are empty arrays
24
25 posargs_inherit: _build_target_base
26 varargs_inherit: _build_target_base
27 kwargs_inherit:
28 - shared_library
29 - static_library
30
31 kwargs:
32 rust_abi:
33 type: str
34 since: 1.3.0
35 description: |
36 Set the specific ABI to compile (when compiling rust).
37 - 'rust' (default): Create a "rlib" or "dylib" crate depending on the library
38 type being build.
39 - 'c': Create a "cdylib" or "staticlib" crate depending on the library
40 type being build.
41
42 <lang>_static_args:
43 type: list[str]
44 since: 1.3.0
45 description:
46 Arguments that are only passed to a static library
47
48 vala_static_args:
49 type: list[str | file]
50 since: 1.3.0
51 description:
52 Arguments that are only passed to a static library
53
54 Like `vala_args`, [[files]] is allowed in addition to string
55
56 <lang>_shared_args:
57 type: list[str]
58 since: 1.3.0
59 description:
60 Arguments that are only passed to a shared library
61
62 vala_shared_args:
63 type: list[str | file]
64 since: 1.3.0
65 description:
66 Arguments that are only passed to a shared library
67
68 Like `vala_args`, [[files]] is allowed in addition to string