diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2022-12-19 12:38:55 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2023-01-04 09:44:32 -0800 |
| commit | 2c8c0f95862f2cf8cdb0c4739d2aead7186b9dd8 (patch) | |
| tree | f214921b2f91049abb25d28eb483745f987c6e47 | |
| parent | 863f2a6d740448da71cc08d91e7e1af1b42cc9e1 (diff) | |
| download | meson-2c8c0f95862f2cf8cdb0c4739d2aead7186b9dd8.tar.gz | |
document declare_dependency(object: ...)
| -rw-r--r-- | docs/markdown/snippets/dep_objects.md | 5 | ||||
| -rw-r--r-- | docs/yaml/functions/declare_dependency.yaml | 7 | ||||
| -rw-r--r-- | docs/yaml/objects/build_tgt.yaml | 4 |
3 files changed, 14 insertions, 2 deletions
diff --git a/docs/markdown/snippets/dep_objects.md b/docs/markdown/snippets/dep_objects.md new file mode 100644 index 000000000..920897748 --- /dev/null +++ b/docs/markdown/snippets/dep_objects.md @@ -0,0 +1,5 @@ +## New `declare_dependency(objects: )` argument + +A new argument to `declare_dependency` makes it possible to add objects +directly to executables that use an internal dependency, without going +for example through `link_whole`. diff --git a/docs/yaml/functions/declare_dependency.yaml b/docs/yaml/functions/declare_dependency.yaml index 752444785..b09a0c0a0 100644 --- a/docs/yaml/functions/declare_dependency.yaml +++ b/docs/yaml/functions/declare_dependency.yaml @@ -71,3 +71,10 @@ kwargs: description: | the directories to add to the string search path (i.e. `-J` switch for DMD). Must be [[@inc]] objects or plain strings. + + objects: + type: list[extracted_obj] + since: 1.1.0 + description: | + a list of object files, to be linked directly into the targets that use the + dependency. diff --git a/docs/yaml/objects/build_tgt.yaml b/docs/yaml/objects/build_tgt.yaml index 2dec75300..6ca43f30b 100644 --- a/docs/yaml/objects/build_tgt.yaml +++ b/docs/yaml/objects/build_tgt.yaml @@ -13,8 +13,8 @@ methods: source files. This is typically used to take single object files and link them to unit tests or to compile some source files with custom flags. To use the object file(s) in another build target, use the - `objects:` keyword argument to a [[build_target]] or include them in the command - line of a [[custom_target]]. + `objects:` keyword argument to a [[build_target]] or [[declare_dependency]], + or include them in the command line of a [[custom_target]]. varargs: name: source type: str | file |
