Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "nolink" dependency type for shared libraries dependent on shared libraries #39

Open
ethouris opened this issue Nov 6, 2024 · 0 comments

Comments

@ethouris
Copy link
Owner

ethouris commented Nov 6, 2024

In contradiction to a program, a shared library need not have all symbols resolved even potentially at link time. Therefore, if a library is being created and then used as a dependency then the following specification should be available:

  • -depends somelib - link against the current available specification. If both static and dynamic are available, prefer static.
  • -depends somelib/static - enforce linking against static library (error if not provided)
  • -depends somelib/shared - enforce linking against shared library (error if not provided)
  • -depends somelib/virtual - add all sources defined for somelib directly to this target sources instead of linking
  • -depends somelib/nolink - enforce target dependency, but don't link against this library at all

The nolink specification should be allowed also when defining a program. This is useful if you have a shared library that will be load and resolved manually, e.g. using dlopen and dlsym functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant