| 1 |
name: shared_library |
| 2 |
returns: lib |
| 3 |
description: Builds a shared library with the given sources. |
| 4 |
|
| 5 |
posargs_inherit: _build_target_base |
| 6 |
varargs_inherit: _build_target_base |
| 7 |
kwargs_inherit: _build_target_base |
| 8 |
|
| 9 |
kwargs: |
| 10 |
version: |
| 11 |
type: str |
| 12 |
description: | |
| 13 |
A string specifying the version of this shared library, |
| 14 |
such as `1.1.0`. On Linux and OS X, this is used to set the shared |
| 15 |
library version in the filename, such as `libfoo.so.1.1.0` and |
| 16 |
`libfoo.1.1.0.dylib`. If this is not specified, `soversion` is used |
| 17 |
instead (see above). |
| 18 |
|
| 19 |
soversion: |
| 20 |
type: str | int |
| 21 |
description: | |
| 22 |
A string or integer specifying the soversion of this shared library, |
| 23 |
such as `0`. On Linux and Windows this is used to set the |
| 24 |
soversion (or equivalent) in the filename. For example, if |
| 25 |
`soversion` is `4`, a Windows DLL will be called `foo-4.dll` and one |
| 26 |
of the aliases of the Linux shared library would be |
| 27 |
`libfoo.so.4`. If this is not specified, the first part of `version` |
| 28 |
is used instead (see below). For example, if `version` is `3.6.0` and |
| 29 |
`soversion` is not defined, it is set to `3`. |
| 30 |
|
| 31 |
darwin_versions: |
| 32 |
type: str | int | list[str] |
| 33 |
since: 0.48.0 |
| 34 |
description: | |
| 35 |
Defines the `compatibility version` and `current version` for the dylib on macOS. |
| 36 |
If a list is specified, it must be |
| 37 |
either zero, one, or two elements. If only one element is specified |
| 38 |
or if it's not a list, the specified value will be used for setting |
| 39 |
both compatibility version and current version. If unspecified, the |
| 40 |
`soversion` will be used as per the aforementioned rules. |
| 41 |
|
| 42 |
vs_module_defs: |
| 43 |
type: str | file | custom_tgt | custom_idx |
| 44 |
description: | |
| 45 |
Specify a Microsoft module definition file for controlling symbol exports, |
| 46 |
etc., on platforms where that is possible (e.g. Windows). |
| 47 |
|
| 48 |
*(Since 1.3.0)* [[@custom_idx]] are supported |
| 49 |
|
| 50 |
rust_abi: |
| 51 |
type: str |
| 52 |
since: 1.3.0 |
| 53 |
description: | |
| 54 |
Set the specific ABI to compile (when compiling rust). |
| 55 |
- 'rust' (default): Create a "dylib" crate. |
| 56 |
- 'c': Create a "cdylib" crate. |