Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
project = 'Common Package Specification'
copyright = '2025, Matthew Woehlke'

version_info = (0, 14, 0)
version_info = (0, 14, 1)
release = '.'.join(map(str, version_info))
version = '.'.join(map(str, version_info[:2]))

Expand Down
36 changes: 34 additions & 2 deletions schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,38 @@ Attribute names are case sensitive.
the latter, when applicable to the source being compiled,
shall have precedence.

.. ----------------------------------------------------------------------------
.. cps:attribute:: dyld_requires
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to me, though would have been nice to have a explicit reference to the -rpath-link ld flag as a motivator and example of the need for this item.

:type: list(string)
:context: component configuration

Specifies additional components required by a component
which are needed only by the dynamic library loader.
Unlike `requires (component)`_ or `link_requires`_,
these are not used to resolve symbol references of the consumer,
but represent "private" implementation requirements
of the component on which this attribute appears.

Typically, such requirements represent a need
to ensure that the required component can be found at run time.
This is usually accomplished in one of three ways:

- Ensuring that the component resides
in a default / "system" search path.

- Encoding the component path in the binary
in a way that influences the dynamic library loader
(e.g. "RPATH").

- Providing the component path in an environment variable
which influences the dynamic library loader's search paths.

The last case requires external information to be provided;
this attribute facilitates tools generating that information.
In some instances, this external library search information
may also be required to successfully link components,
if the linker demands that all library references can be resolved.

.. ----------------------------------------------------------------------------
.. cps:attribute:: hints
:type: list(string)
Expand Down Expand Up @@ -427,8 +459,8 @@ Attribute names are case sensitive.
:type: list(string)
:context: component configuration

Specifies a list of additional libraries that must be linked against
when linking code that consumes the component.
Specifies a list of additional libraries (as paths, not components)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to clarify here that the paths doesn't need to be absolute, and that a possible intended use case, if I understood it correctly, is linkage to system libraries such as typical -lm -lpthread or w_sock32 in Win, that are necessary to be specified, so link_libraries = ["wsock32"] would be a valid entry?

that must be linked against when linking code that consumes the component.
(Note that packages should avoid using this attribute if at all possible.
Use `requires (component)`_ instead whenever possible.)

Expand Down