[PATCH] D119108: [ELF] Remove GNU ld incompatible --[no-]define-common and obscure -dc/-dp

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 10:37:50 PST 2022


MaskRay added a comment.

In D119108#3303807 <https://reviews.llvm.org/D119108#3303807>, @peter.smith wrote:

> While in this case I think you are right, and no-one using LLD will be depending on this. I'm a bit uncomfortable with taking options out without a bit more warning and chance for feedback. I think it could be worth using this to set out LLD's deprecation/removal process. For example for options that maintainers want to remove we've got several options, or even a combination depending on circumstances:
>
> - Option will be deprecated (with a silenceable warning) for a release, then removed in the subsequent release.
> - Option will be removed if there is no use of it in an open source project.
> - Option will be removed if a post on the community discourse/mailing lists, github issue has no one feedback with a good reason to keep it within a certain time frame.
> - Option will be set to silent ignore if a valid, if sub-optimal output can be produced without applying the option.
>
> I'd strongly recommend that we at least make a github issue (more search engine friendly than a review) and a post on discourse first. Ideally agree some kind of process so that people using LLD can know what to expect.

Good idea. Created https://github.com/llvm/llvm-project/issues/53660 & https://discourse.llvm.org/t/remove-gnu-ld-incompatible-no-define-common-and-obscure-dc-dp/59894 as the first step.
Perhaps you may start a post about deprecation policy since you already got the wording:) ?

I think for -dc and -dp we can warn about them in the `release/14.x` branch. The warning will (a) give us idea whether they are really unused, (b) push projects to remove the options, (c) decide whether we should (actually quite trivial) keep them with full functionality, keep them as ignored options, or remove them altogether.

For `release/14.x`, I am thinking of this warning:

  cpp
     if (args.hasArg(OPT_define_common, OPT_no_define_common))                                                                                                                                                                      
       warn("-d, -dc, -dp, and --[no-]define-common are ignored and will be removed. See https://github.com/llvm/llvm-project/issues/53660");


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119108



More information about the llvm-commits mailing list