You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of binutils release 2.44 (Feb 2025), the gold linker is officially deprecated, and its sources are no longer included in the default release tarball.
In a change to our previous practice, in this release the binutils-2.44.tar tarball does not contain the sources for the gold linker. This is because the gold linker is now deprecated and will eventually be removed unless volunteers step forward and offer to continue development and maintenance.
Proposed solution
It's my understanding that bootstrapping Swift on platforms like Linux defaults to using the GNU Gold linker, rather than lld.
Bootstrap scripts and other install instructions should be updated to mention that the gold linker is no longer maintained upstream, and that the lld linker should be used instead.
Looking around it seems like the swift-driver no longer defaults to gold, and respects the -fuse-ld option more readily on main than in previous releases.
Support for the gold linker should be dropped entirely imo. Attempting to use it could result in an error at the driver level, or it could simply be "not recommended" with issues stemming from its use auto-closed with a "not our problem" message.
Alternatives considered
It's unlikely that the swift team or community have the will to maintain the gold linker themselves.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Thanks for filing and linking that announcement. The good news is that since the latest 6.0.3 release, the swift-driver always delegates to the C compiler used for linking too, swiftlang/swift-driver@15402470a, and has no more logic to choose a linker itself. Since the clang shipped by Swift picks gold on some platforms, it will still end up using gold there, but that is an upstream LLVM choice.
As for bootstrapping the compiler, unfortunately that is still done with Swift 5.8.1 on the linux CI, and the swift-driver back then chose gold as the linker on some platforms, overriding whatever clang chose. We could of course override that older default in the build presets, which should work fine, because lld has worked well for awhile.
Maybe @etcwilde and @al45tair have more to add, as they made some of those linker changes before.
Motivation
As of binutils release 2.44 (Feb 2025), the gold linker is officially deprecated, and its sources are no longer included in the default release tarball.
https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html
Proposed solution
It's my understanding that bootstrapping Swift on platforms like Linux defaults to using the GNU Gold linker, rather than lld.
Bootstrap scripts and other install instructions should be updated to mention that the gold linker is no longer maintained upstream, and that the lld linker should be used instead.
Looking around it seems like the swift-driver no longer defaults to gold, and respects the -fuse-ld option more readily on main than in previous releases.
Support for the gold linker should be dropped entirely imo. Attempting to use it could result in an error at the driver level, or it could simply be "not recommended" with issues stemming from its use auto-closed with a "not our problem" message.
Alternatives considered
It's unlikely that the swift team or community have the will to maintain the gold linker themselves.
Additional information
No response
The text was updated successfully, but these errors were encountered: