Page MenuHomePhabricator

Pass -gcodeview-ghash when using clang-cl and lld-link

Authored by rnk on Thu, May 27, 2:35 PM.



This precomputes some hashes that LLD uses for type merging to speed up
linking when PDBs are enabled. Only do this if any kind of /DEBUG flag
is passed to the linker. -gcodeview-ghash is orthogonal to /Z7, -g, -g1,
or -gmlt, so it is safe to set it independently from those flags. It
will not increase debug info emission.

Diff Detail

Event Timeline

rnk created this revision.Thu, May 27, 2:35 PM
rnk requested review of this revision.Thu, May 27, 2:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptThu, May 27, 2:35 PM
aganea added inline comments.Thu, May 27, 5:00 PM

Do we need prior testing of the Clang version? I believe this won't work if using Clang 10 or before as a bootstrap compiler?

rnk updated this revision to Diff 348436.Thu, May 27, 8:06 PM
  • do the feature check
aganea accepted this revision.Thu, May 27, 8:24 PM

Great, LGTM! Thanks Reid!

This revision is now accepted and ready to land.Thu, May 27, 8:24 PM
This revision was automatically updated to reflect the committed changes.