Skip to content

Tracking Issue for feature(packed_bundled_libs) #108081

Open
@petrochenkov

Description

@petrochenkov

This is a tracking issue for the fix for issue "Linking modifier whole-archive and link time cfg 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 or cfg 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

  • the packed representation minimizes differences with classic non-bundled (-bundle) static libraries
  • the unpacked representation is needed when the rlib actually provides missing symbols to the native static lib, not just depends on it, as can be seen from the breakage report in [WIP] Native library linking changes for crater testing #102832

Stabilizing 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

Unresolved Questions

None yet.

Implementation history

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-packed_bundled_libs`#![feature(packed_bundled_libs)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions