Skip to content

Stop using dlltool for generating import libraries on MinGW #1029

Description

@bjorn3

Proposal

Older versions of ld.bfd didn't properly support short import libraries as archive members like the builtin implementation of rustc generates. So we worked around this by using binutils dlltool, which produces the old import library format. We have now bumped the minimum supported ld.bfd version to one which properly handles them, so we can drop the dlltool usage. This makes cross-compilation a bit easier and removes a bunch of code in rustc.

So far, rustc used to pick whatever dlltool it could find in PATH, and fail if couldn't find it. The related argument -Cdlltool allows explicit choice of the dlltool binary.
For now -Cdlltool will still be respected if passed, but if not passed, no implicit dlltool will be used anymore.

This has been implemented in rust-lang/rust#161050.

Mentors or Reviewers

@mati865

Process

The main points of the Major Change Process are as follows:

  • File an issue describing the proposal.
  • A compiler team member who is knowledgeable in the area can second by writing @rustbot second or kickoff a team FCP with @rfcbot fcp $RESOLUTION.
  • Once an MCP is seconded, the Final Comment Period begins.
    • Final Comment Period lasts for 10 days after all outstanding concerns are solved.
    • Outstanding concerns will block the Final Comment Period from finishing. Once all concerns are resolved, the 10 day countdown is restarted.
    • If no concerns are raised after 10 days since the resolution of the last outstanding concern, the MCP is considered approved.

You can read more about Major Change Proposals on forge.

Note

Concerns (0 active)

Managed by @rustbot—see help for details.

Activity

  1. added
    T-compilerAdd this label so rfcbot knows to poll the compiler team
    major-changeA proposal to make a major change to rustc
    on Aug 8, 2026
  2. rustbot commented on Aug 8, 2026

    @rustbot
    Collaborator

    Important

    This issue is not meant to be used for technical discussion. There is a Zulip stream for that.
    Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

    Concerns or objections can formally be registered here by adding a comment.

    @rustbot concern reason-for-concern
    <description of the concern>
    

    Concerns can be lifted with:

    @rustbot resolve reason-for-concern
    

    See documentation at https://forge.rust-lang.org

    cc @rust-lang/compiler
  3. mati865 commented on Aug 8, 2026

    @mati865
    Member

    @rustbot second

  4. added
    final-comment-periodThe FCP has started, most (if not all) team members are in agreement
    on Aug 8, 2026
  5. RalfJung commented on Aug 8, 2026

    @RalfJung
    Member

    @rustbot concern flag
    Apparently there's also a -C flag affected by this change. The MCP should be amended to explain which flag is affected how and why.

  6. mati865 commented on Aug 14, 2026

    @mati865
    Member

    @rustbot resolve flag

    The MCP was updated to address the concerns.

  7. rustbot commented on Aug 24, 2026

    @rustbot
    Collaborator

    The final comment period is now complete, this major change is now accepted. 🎉

    As the automated representative, I want to express gratitude to the author for their work and everyone else who contributed to this major change proposal.

    If you think this major change shouldn't have been accepted, feel free to remove the major-change-accepted label and reopen this issue.

    Note

    Further progress is now tracked over at rust-lang/rust#161671.

  8. added and removed
    final-comment-periodThe FCP has started, most (if not all) team members are in agreement
    on Aug 24, 2026
  9. locked as resolved and limited conversation to collaborators on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was accepted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions