document declare_dependency(object: ...)

pull/11240/head
Paolo Bonzini 2 years ago committed by Dylan Baker
parent 863f2a6d74
commit 2c8c0f9586
  1. 5
      docs/markdown/snippets/dep_objects.md
  2. 7
      docs/yaml/functions/declare_dependency.yaml
  3. 4
      docs/yaml/objects/build_tgt.yaml

@ -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`.

@ -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.

@ -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

Loading…
Cancel
Save