This is an archive of the discontinued LLVM Phabricator instance.

lld: Add --color-diagnostic to MachO port, harmonize others
ClosedPublic

Authored by thakis on Nov 17 2020, 9:26 AM.

Details

Summary

This adds --[no-]color-diagnostics[=auto,never,always] to
the MachO port and harmonizes the flag in the other ports:

  • Consistently use MetaVarName
  • Consistently document the non-eq version as alias of the eq version
  • Use B<> in the ports that have it (no-op, shorter)
  • Fix oversight in COFF port that made the --no flag have the wrong prefix

Diff Detail

Event Timeline

thakis created this revision.Nov 17 2020, 9:26 AM
thakis requested review of this revision.Nov 17 2020, 9:26 AM
MaskRay accepted this revision.Nov 17 2020, 9:40 AM
MaskRay added a reviewer: int3.

LG, please wait for @int3

This revision is now accepted and ready to land.Nov 17 2020, 9:41 AM
int3 accepted this revision.Nov 17 2020, 9:46 AM

lgtm

lld/test/MachO/color-diagnostics.test
5

here and below

Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2020, 9:58 AM
thakis marked an inline comment as done.Nov 17 2020, 9:59 AM

Thanks!

@int3 , would you mind if I moved the opttable stuff to DriverUtils.cpp (in another change), to make lld/MachO more like the other ports?

int3 added a comment.Nov 17 2020, 9:59 AM

Sounds good to me :)

Sounds good to me :)

Done in c519bc7e16f5aad3ddb6f9df8be5f7b9249c4101, thanks :)