Repository navigation
Stop using dlltool for generating import libraries on MinGW #1029
Description
Activity
- addedT-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustc
on Aug 8, 2026 - addedto-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
on Aug 8, 2026 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.cc @rust-lang/compilerConcerns 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-concernSee documentation at https://forge.rust-lang.org
@rustbot second
- addedfinal-comment-periodThe FCP has started, most (if not all) team members are in agreementThe FCP has started, most (if not all) team members are in agreement
on Aug 8, 2026 @rustbot concern flag
Apparently there's also a-Cflag affected by this change. The MCP should be amended to explain which flag is affected how and why.@rustbot resolve flag
The MCP was updated to address the concerns.
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-acceptedlabel and reopen this issue.Note
Further progress is now tracked over at rust-lang/rust#161671.
- addedmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was acceptedand removedfinal-comment-periodThe FCP has started, most (if not all) team members are in agreementThe FCP has started, most (if not all) team members are in agreement
on Aug 24, 2026 - locked as resolved and limited conversation to collaborators
on Aug 24, 2026 - removedto-announceAnnounce this issue on triage meetingAnnounce this issue on triage meeting
on Sep 10, 2026
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
-Cdlltoolallows explicit choice of the dlltool binary.For now
-Cdlltoolwill 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:
@rustbot secondor kickoff a team FCP with@rfcbot fcp $RESOLUTION.You can read more about Major Change Proposals on forge.
Note
Concerns (0 active)
flagresolved in this commentManaged by
@rustbot—see help for details.