-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 linking of rlib files in rustpkg #11500
Conversation
Hm, I'm a little uncomfortable committing this because this seems to me like a clear indication that rustpkg is duplicating functionality that it shouldn't. This has different behavior when finding duplicate rlibs and duplicate dylibs which seems surprising to me. Can you look into whether |
I thought exactly the same, but thought there must be a reason for this to be rewritten in rustpkg. I will look into it ;) btw: There seems to be more places with duplicated functionality in rustpkg: #11502 |
Okay what I found so far: The function A solution could be to use The best solution would be to further integrate rustc's build process and rustpkg. E.g. when rustpkg finds the libraries it could already pass the Unfortunately I don't see myself skilled enough in Rust to implement either solution (also lacking enough time to do it). Maybe merge this and see where rustpkg is going in the future anyway? |
I guess I'm a little unclear on why rustpkg is trying to find libraries, do you know why? I would imagine that to be correct rustpkg must open and read the metadata to ensure that it has the right version, but it's not doing that? |
It tries to search for outputs because it didn't use the logic to calculate the crate hash. That part can be easily fixed now. I'm not sure why it also searches inputs, but I suspect because rustc does not know about RUST_PATH and there might be many places to search. Perhaps @catamorphism remembers. |
Currently `rustpkg` only looks for shared libraries. After this patch it also looks for `*.rlib` files.
Currently
rustpkg
only looks for shared libraries. After this patch it also looks for*.rlib
files.