-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Static libs are doubling up on new lang item definitions #14355
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
Comments
cc @alexcrichton (thanks for filing!) |
The staticlib format was initially intended to be the only compilation unit of rust included in an external product. Including two staticlibs was not an intended use case of staticlibs (hence the duplicated symbols). Each staticlib output is inteded to be its own standalone version of the rust world necessary for it to run. Could you combine the two staticlibs into one staticlib with a meta-crate? |
Probably (im not the primary maintainer). Don't mind if this is
|
Ok, for now I'm going to close this as WONTFIX and instead recommend only one staticlib being included at a time. We may want to revisit that decision later, but for now that's the state of things. |
fix: Fix reference completions being emitted in places other than argument lists Fixes rust-lang/rust-analyzer#14331
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80. changelog: none
Since #14293 I have added the dummy lang items for the weak linking in my projects (or I am unable to build static libs). Now static libs are defining
rust_eh_personality
andrust_stack_exhausted
which is causing linker errors due to duplicate definitions.Note: This is only for static libs, rlibs are fine. See travis log here https://travis-ci.org/bharrisau/zinc/jobs/25774156
The text was updated successfully, but these errors were encountered: