[PATCH] D93491: [lld/mac] Add --version flag

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 18:37:26 PST 2020


int3 accepted this revision.
int3 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/MachO/Driver.cpp:768-769
 
   if (args.hasArg(OPT_v)) {
     message(getLLDVersion());
     message(StringRef("Library search paths:") +
----------------
thakis wrote:
> int3 wrote:
> > I assume that -- unlike for `-v` -- we're intentionally not printing out the library/framework search paths for `--version`... could we update the help text to indicate how `-v` differs? Also, how about handling `OPT_version` here, next to `OPT_v`, just to co-locate similar logic?
> The other ports have `--version` up top, before doing any other flag pcoessing. `-v` has to do flag processing to get the search paths, but `--version` doesn't, so I'd prefer to keep it up there. Updated the help text for `-v`.
fair enough


================
Comment at: lld/MachO/Options.td:513-515
 def v : Flag<["-"], "v">,
      HelpText<"Print the linker version">,
      Group<grp_rare>;
----------------
thakis wrote:
> int3 wrote:
> > I think it'd make sense to put the flag here under `grp_rare`
> Currently all the non-ld64 flags are up top under the `Flags that lld/MachO understands but ld64 doesn't` comment. Want to to add `Group<grp_rare>` up there?
hmm I guess we can leave it as-is. maybe we should make a group specifically for lld-specific options?


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

https://reviews.llvm.org/D93491



More information about the llvm-commits mailing list