Skip to content

Commit a1a25fa

Browse files
committed
Add dyld_requires
Add an attribute to allow specifying requirements that are only needed to satisfy the dynamic library loader (or the linker, when operating in certain strict modes). Because these are only needed by the build in limited cases (and arguably are only "needed" to work around broken environments), this is not being treated as a breaking schema change. While this could conceivably have a `dyld_libraries` companion, that is not being added at this time. (Anyway, `link_libraries` is discouraged, and `dyld_libraries` would be as well.) Fixes: #106
1 parent 52226be commit a1a25fa

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
project = 'Common Package Specification'
1414
copyright = '2025, Matthew Woehlke'
1515

16-
version_info = (0, 14, 0)
16+
version_info = (0, 14, 1)
1717
release = '.'.join(map(str, version_info))
1818
version = '.'.join(map(str, version_info[:2]))
1919

schema.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,38 @@ Attribute names are case sensitive.
307307
the latter, when applicable to the source being compiled,
308308
shall have precedence.
309309

310+
.. ----------------------------------------------------------------------------
311+
.. cps:attribute:: dyld_requires
312+
:type: list(string)
313+
:context: component configuration
314+
315+
Specifies additional components required by a component
316+
which are needed only by the dynamic library loader.
317+
Unlike `requires (component)`_ or `link_requires`_,
318+
these are not used to resolve symbol references of the consumer,
319+
but represent "private" implementation requirements
320+
of the component on which this attribute appears.
321+
322+
Typically, such requirements represent a need
323+
to ensure that the required component can be found at run time.
324+
This is usually accomplished in one of three ways:
325+
326+
- Ensuring that the component resides
327+
in a default / "system" search path.
328+
329+
- Encoding the component path in the binary
330+
in a way that influences the dynamic library loader
331+
(e.g. "RPATH").
332+
333+
- Providing the component path in an environment variable
334+
which influences the dynamic library loader's search paths.
335+
336+
The last case requires external information to be provided;
337+
this attribute facilitates tools generating that information.
338+
In some instances, this external library search information
339+
may also be required to successfully link components,
340+
if the linker demands that all library references can be resolved.
341+
310342
.. ----------------------------------------------------------------------------
311343
.. cps:attribute:: hints
312344
:type: list(string)

0 commit comments

Comments
 (0)