-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustc needs parameter for soname (or ld flags in general) #43190
Comments
You can use But as I mentioned in #43186, I don't think one should do this without actually ensuring the ABI stability that this implies. It's not there at all for Rust APIs -- rust-lang/rfcs#600 -- and even if it were it would probably still take some effort by the library author to do it right. It could make sense for a cdylib, if you do make sure to keep that ABI stable. |
In the context of cargo, that could be For supporting cdylibs, it may make sense to add some cargo support. Alternately, one could use something like |
This feels like this is perhaps a Cargo issue, since I think -Clink-arg on Rust's side is sufficient based on discussion here. This may need an RFC, though. |
rustc currently doesn't add, and doesn't allow specifying the library soname.
Thus, ld cannot differenciate between binary versions, which makes it extremley hard to have multiple versions coexist (requires horrible LD_LIBRARY_PATH games), and therefore causes bad headaches for distro packaging.
Actually, it doesn't even allow passing any linker flags at all.
The text was updated successfully, but these errors were encountered: