-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support for sharedlinkflags and exelinkflags #13
Comments
This seems reasonable. But shouldn't It would be great if you could find a package that actually sets these properties on Also, some kind of a test case in |
I'm also not super sure about only applying to cdylib crates, and after looking around am not fully sure there's an easy way to detect this. Can you think of adverse effects of not putting this detection in? |
I've looked at how https://github.com/conan-io/conan/blob/develop2/conan/tools/cmake/toolchain/blocks.py#L738 OTOH, GNU autotools and meson generators just lump all https://github.com/conan-io/conan/blob/develop2/conan/tools/meson/toolchain.py#L429 As for the adverse affects, I'm not sure, because the Conan package authors can put literally anything there. Some GCC linker flags are only applicable to DSO outputs and raise a link error when used with executables. I'd prefer to err on the safe side and try to do what the CMake generator currently does. As for the automatic detection, I don't think this can be done in the build scripts. |
Makes sense to me, thanks. Putting up a PR momentarily. |
Thanks! I'd prefer a tagged release ASAP if it's not too much hassle for you. |
Released |
I noticed that
visit_cpp_component
doesn't expose the Conan settingssharedlinkflags
andexelinkflags
. It appears that sharedlinkflags could just map tocargo::rustc-link-arg={flags}
, andexelinkflags
could map tocargo::rustc-link-arg-bin=${CARGO_BIN_NAME}={flags}
if theCARGO_BIN_NAME
environment variable is set?Happy to submit a PR as well if wanted.
The text was updated successfully, but these errors were encountered: