[PATCH] D114186: [lld][CMake] Add LLD_DEFAULT_NOSTART_STOP_GC

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 2 13:37:31 PST 2021


jrtc27 added a comment.

In D114186#3168029 <https://reviews.llvm.org/D114186#3168029>, @dim wrote:

> In D114186#3167979 <https://reviews.llvm.org/D114186#3167979>, @jrtc27 wrote:
>
>> I've tried to stay out of this for my own sanity, but my objection has not been about the end state which, in a world where SHF_GNU_RETAIN can be relied upon to work, is a more sensible state than historically (I would've preferred that uses that wanted the new GC behaviour use a new way of doing things rather than repurposing something that didn't do the right thing and then forcing their needs on it, breaking existing uses, but I can see and appreciate the technical reasons for doing it this way, and ignoring compatibility issues it does make more sense). My objection has been that SHF_GNU_RETAIN is not ubiquitous enough, both in terms of support and use, for the default start-stop-gc behaviour to have been changed.
>
> I agree that that is the main reason for making start-stop-gc not the default *yet*. But what is the criterion for having "enough" `SHF_GNU_RETAIN` support? In the llvm/clang world you typically upgrade the compiler and linker at the same time, so as long as clang supports `SHF_GNU_RETAIN` *now* it should be okay for that part.
>
> But what about third parties like gcc, dlang, etc? When will we consider them to be sufficiently up-to-date with regards to retain attributes?

For this kind of change, where some software will end up having to bump its minimum dependency versions (like ldc, so it can either use a libLLVM that supports SHF_GNU_RETAIN or pass -z nostart-stop-gc to lld), I would normally say two years, as that's the usual release cycle cadence for major Linux distributions (or LTS versions if they have interim releases), since otherwise there won't be a(n LTS) release of a given distro that is able to satisfy the updated dependency requirements. If all the issues with flipping the default get resolved before then in ways that don't require bumping dependencies then great, it can be shorter.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114186/new/

https://reviews.llvm.org/D114186



More information about the llvm-commits mailing list