-
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
Tracking Issue for feature(packed_bundled_libs)
#108081
Comments
Future directions:
|
So I think we need to eventually switch everything to using the new (packed) format, e.g. on 2024 edition, because it's a slightly breaking change. I think the main goal is to fully preserve static library semantic, in that case
For dealing with the breakage in #102832 we need:
|
We have an interesting use case for
I'm not sure how the discussion above about packed versus unpacked rlibs relates to this. Somehow, we need a way to link a library (or object files) built by the cc crate in build.rs to an rlib crate and have those symbols included in the final downstream staticlib and bin products produced by Cargo. |
"Packed" supports The discussion above is mainly about enabling "packed" by default for everything. |
Do you mean automatically turning on |
@Be-ing |
Currently, combining +bundle and +whole-archive works only with #![feature(packed_bundled_libs)] This crate feature is independent of the -Zpacked-bundled-libs command line option. This commit stabilizes the #![feature(packed_bundled_libs)] crate feature and implicitly enables it only when the +bundle and +whole-archive link modifiers are combined. This allows rlib crates to use the +whole-archive link modifier with native libraries and have all symbols included in the linked library to be included in downstream staticlib crates that use the rlib as a dependency. Other cases requiring the packed_bundled_libs behavior still require the -Zpacked-bundled-libs command line option, which can be stabilized independently in the future. Per discussion on rust-lang#108081 there is no risk of regression stabilizing the crate feature in this way because the combination of +bundle,+whole-archive link modifiers was previously not allowed.
…e, r=petrochenkov stabilize combining +bundle and +whole-archive link modifiers Per discussion on rust-lang#108081 combining +bundle and +whole-archive already works and can be stabilized independently of other aspects of the packed_bundled_libs feature. There is no risk of regression because this was not previously allowed. r? `@petrochenkov`
…ochenkov stabilize combining +bundle and +whole-archive link modifiers Per discussion on rust-lang/rust#108081 combining +bundle and +whole-archive already works and can be stabilized independently of other aspects of the packed_bundled_libs feature. There is no risk of regression because this was not previously allowed. r? `@petrochenkov`
…ochenkov stabilize combining +bundle and +whole-archive link modifiers Per discussion on rust-lang/rust#108081 combining +bundle and +whole-archive already works and can be stabilized independently of other aspects of the packed_bundled_libs feature. There is no risk of regression because this was not previously allowed. r? `@petrochenkov`
…ochenkov stabilize combining +bundle and +whole-archive link modifiers Per discussion on rust-lang/rust#108081 combining +bundle and +whole-archive already works and can be stabilized independently of other aspects of the packed_bundled_libs feature. There is no risk of regression because this was not previously allowed. r? `@petrochenkov`
This is a tracking issue for the fix for issue "Linking modifier
whole-archive
and link timecfg
are not supported on bundled static libraries" (#99429).The feature gate for the issue is
#![feature(packed_bundled_libs)]
.Currently to combine
+bundle
native libraries with+whole-archive
orcfg
a new representation of bundled native libraries in a rlib used, in which the library is packed into the archive as a whole (and wrapped into an object file for technical reasons), and then unpacked when you need to link to it.Other representations are also possible, e.g. keeping the bundled lib in the old "unpacked" format as a set of object files, and adding some description file telling which object files belong to which library, it would be more complex though.
It may be quite reasonable to support both packed and unpacked representations, both have their uses
-bundle
) static librariesStabilizing the
+bundle,+whole-archive
combination doesn't need specifying any of these details, we just need to promise that it somehow works.About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
instructions?)
Unresolved Questions
None yet.
Implementation history
The text was updated successfully, but these errors were encountered: