Skip to content

Commit 63d47a3

Browse files
committed
document declare_dependency(object: ...)
1 parent fbd4973 commit 63d47a3

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

docs/markdown/snippets/dep_objects.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## New `declare_dependency(objects: )` argument
2+
3+
A new argument to `declare_dependency` makes it possible to add objects
4+
directly to executables that use an internal dependency, without going
5+
for example through `link_whole`.

docs/yaml/functions/declare_dependency.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,10 @@ kwargs:
7171
description: |
7272
the directories to add to the string search path (i.e. `-J` switch for DMD).
7373
Must be [[@inc]] objects or plain strings.
74+
75+
objects:
76+
type: list[extracted_obj]
77+
since: 1.1.0
78+
description: |
79+
a list of object files, to be linked directly into the targets that use the
80+
dependency.

docs/yaml/objects/build_tgt.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ methods:
1313
source files. This is typically used to take single object files and link
1414
them to unit tests or to compile some source files with custom flags. To
1515
use the object file(s) in another build target, use the
16-
`objects:` keyword argument to a [[build_target]] or include them in the command
17-
line of a [[custom_target]].
16+
`objects:` keyword argument to a [[build_target]] or [[declare_dependency]],
17+
or include them in the command line of a [[custom_target]].
1818
varargs:
1919
name: source
2020
type: str | file

0 commit comments

Comments
 (0)