-
Notifications
You must be signed in to change notification settings - Fork 37
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 support for adding link dependencies via --cxx-link
.
#1244
Conversation
334a645
to
f7ebd2b
Compare
@rsmmr, I still need to figure out how to make the test case work on |
I think my main question is if an environment variable is the right mechanism here. On the plus side, it matches what we do for include paths. On the other hand, it seems unusual to pass specific libraries/targets through an environment variables (whereas it's common for a search path like the include dirs). The alternative would be a command line option (and we could add one for include directories, too, then on top of the env var). |
I think we want to support cases where Spicy analyzers use e.g., the CMake macro |
f7ebd2b
to
05a2bbe
Compare
HILTI_CXX_LINK_LIBS
.--cxx-link
.
Updated this as discussed offline. Libs can now be passed with the flag I also tried adding the global way to pass arbitrary command line args to our drivers that you mentioned (e.g., |
05a2bbe
to
579cba0
Compare
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.
579cba0
to
12fa76f
Compare
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 toolingto 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 orintroduce a shared library dependency into the created HLTO file and
needs only to be specified for the step creating the HLTO file.
Closes #1236.