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

Make it possible to specify link dependencies when building HLTO files #1236

Closed
bbannier opened this issue Jul 5, 2022 · 0 comments · Fixed by #1244
Closed

Make it possible to specify link dependencies when building HLTO files #1236

bbannier opened this issue Jul 5, 2022 · 0 comments · Fixed by #1244
Assignees
Labels
Enhancement Improvement of existing functionality

Comments

@bbannier
Copy link
Contributor

bbannier commented Jul 5, 2022

We currently allow specifying include directories when building HLTO files via HILTI_CXX_INCLUDE_DIRS. We should consider adding a similar mechanism to specify link dependencies. This would allow users to directly expose library code in Spicy without having to build HLTO files themselves.

@bbannier bbannier added the Enhancement Improvement of existing functionality label Jul 5, 2022
@bbannier bbannier self-assigned this Jul 5, 2022
bbannier added a commit that referenced this issue Jul 7, 2022
We already supported specifying additional include directories, but
injecting additional link dependencies into the link always required
manually compiling and linking files. So while users could already
declare e.g., existing functions with `&cxxname`, we provided no tooling
to use such functions if we were defined in external libraries or static
archives.

This patch adds support for that. One can now reference static archives
or shared libraries to include in the link in the environment variable
`HILTI_CXX_LINK_LIBS`. This variable contains a colon-separated list of
artifacts the linker can find (e.g., in default linker search path, or
in the current directory). This will copy symbols for static archives or
introduce a shared library dependency into the created HLTO file and
works needs only to be specified for the step creating the HLTO file.

Closes #1236.
bbannier added a commit that referenced this issue Jul 7, 2022
We already supported specifying additional include directories, but
injecting additional link dependencies into the link always required
manually compiling and linking files. So while users could already
declare e.g., existing functions with `&cxxname`, we provided no tooling
to use such functions if we were defined in external libraries or static
archives.

This patch adds support for that. One can now reference static archives
or shared libraries to include in the link in the environment variable
`HILTI_CXX_LINK_LIBS`. This variable contains a colon-separated list of
artifacts the linker can find (e.g., in default linker search path, or
in the current directory). This will copy symbols for static archives or
introduce a shared library dependency into the created HLTO file and
works needs only to be specified for the step creating the HLTO file.

Closes #1236.
bbannier added a commit that referenced this issue Jul 11, 2022
We already supported specifying additional include directories, but
injecting additional link dependencies into the link always required
manually compiling and linking files. So while users could already
declare e.g., existing functions with `&cxxname`, we provided no tooling
to use such functions if we were defined in external libraries or static
archives.

This patch adds support for that. One can now reference static archives
or shared libraries to include in the link by passing them with
`--cxx-link <lib>`. This will copy symbols for static archives or
introduce a shared library dependency into the created HLTO file and
needs only to be specified for the step creating the HLTO file.

Closes #1236.
bbannier added a commit that referenced this issue Jul 11, 2022
We already supported specifying additional include directories, but
injecting additional link dependencies into the link always required
manually compiling and linking files. So while users could already
declare e.g., existing functions with `&cxxname`, we provided no tooling
to use such functions if we were defined in external libraries or static
archives.

This patch adds support for that. One can now reference static archives
or shared libraries to include in the link by passing them with
`--cxx-link <lib>`. This will copy symbols for static archives or
introduce a shared library dependency into the created HLTO file and
needs only to be specified for the step creating the HLTO file.

Closes #1236.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant