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

rust: Warn if non-staticlib/cdylib Rust libraries are linked into targets of other languages #11722

Open
sdroege opened this issue Apr 24, 2023 · 1 comment

Comments

@sdroege
Copy link
Contributor

sdroege commented Apr 24, 2023

Only staticlib/cdylib crate types have a useful ABI that can be consumed by other languages and linking other crate types into a target of some other language is almost certainly a mistake.

CC @xclaesse (kind of related to your clib PR)

@sdroege
Copy link
Contributor Author

sdroege commented Apr 24, 2023

Related also #11721 . There rlibs are linked into a C++ binary, but that shouldn't happen at all in that case and is a bug in itself.

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

2 participants