compiler-team icon indicating copy to clipboard operation
compiler-team copied to clipboard

Static vs dynamic linking defaults for MUSL targets

Open wesleywiser opened this issue 4 years ago • 1 comments

Meeting proposal info

Summary

Rust currently has Tier 2 targets for a number of platforms while using MUSL for libc (various flavors of ARM, MIPS and x86) as well as some Tier 3 targets (Hexagon, PowerPC, RISC-V, S390x and ARMv7 Thumb). Currently (most of) these targets statically link to MUSL libc during compilation. While that can be desirable to build fully statically linked binaries, this creates issues for MUSL based Linux distros which want to dynamically link libc. These issues have lead to a suboptimal experience for distro maintainers trying to bring Rust up in their distros.

https://github.com/rust-lang/rust/pull/82556 seeks to improve the status quo. Originally, the plan was to create a new set of targets for dynamically linked MUSL. Since then, a new approach has been suggested which would not require duplicating the set of MUSL targets: change the current targets to dynamically link by default (which matches the behavior of the corresponding glibc targets). This approach has support from participants in the PR thread but there are some questions that should be resolved:

  • Is changing the defaults for these targets feasible (in some sense, breaking the current behavior)?
  • How can we mitigate the impact to users of these targets?
  • What steps need to be taken to appropriately message this change to users?
  • If this is not feasible, should we add new targets for dynamically linked MUSL instead (and what name should they be given)?

About this issue

This issue corresponds to a meeting proposal for the compiler team steering meeting. It corresponds to a possible topic of discussion. You can read more about the steering meeting procedure here.

Comment policy

These issues are meant to be used as an "announcements channel" regarding the proposal, and not as a place to discuss the technical details. Feel free to subscribe to updates. We'll post comments when reviewing the proposal in meetings or making a scheduling decision. In the meantime, if you have questions or ideas, ping the proposers on Zulip (or elsewhere).

wesleywiser avatar Mar 11 '21 21:03 wesleywiser

This meeting has been scheduled for March 26 at 10am EDT (14:00 UTC).

wesleywiser avatar Mar 22 '21 14:03 wesleywiser

We discussed this doc: https://hackmd.io/YoAGSxUsRWumVvbRiHddrg?view

The zulip archive will serve as the official record for the meeting: https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bdesign.20meeting.5D.202021-03-26.20musl.20linking.20compiler-team.23416/near/231967786

pnkfelix avatar May 05 '23 15:05 pnkfelix