[PATCH] D59025: Add --add-ghashes to llvm-objcopy to append a .debug$H to coff objects

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 13:08:03 PDT 2019


Yes, I think there’s good value in having both (this patch and parallel ghash in the linker), essentially for incremental compilation. Most content programmers here (gameplay, UX, animation, physics, graphic) are iterating in about the same CPP files during a day of work. Ultimately, we want to reduce build time as much as possible and only pay for the changes (in both compiler and the linker)

The other alternative to this patch would be do exactly the same thing, ie.write .debug$H to OBJs, but directly from LLD, when specifying /INCREMENTAL or some other dedicated option. If the .debug$H isn’t there, you write it back right there, and next build you won’t have to pay for it.

From: Zachary Turner <zturner at google.com>
Sent: Monday, March 18, 2019 3:40 PM
To: reviews+D59025+public+309b7d4311d79b0b at reviews.llvm.org
Cc: santagada at gmail.com; alexander.v.shaposhnikov at gmail.com; rupprecht at google.com; Alexandre Ganea <alexandre.ganea at ubisoft.com>; martin at martin.st; rnk at google.com; jh7370 at my.bristol.ac.uk; jakehehrlich at google.com; mgorny at gentoo.org; llvm-commits at lists.llvm.org
Subject: Re: [PATCH] D59025: Add --add-ghashes to llvm-objcopy to append a .debug$H to coff objects

With recent work focusing on computing ghashes in parallel in the linker, which would ultimately eliminate the need to write them to the object file entirely, does this still have the same value?
On Mon, Mar 18, 2019 at 12:32 PM Alexandre Ganea via Phabricator <reviews at reviews.llvm.org<mailto:reviews at reviews.llvm.org>> wrote:
aganea added a comment.

In D59025#1433050 <https://reviews.llvm.org/D59025#1433050>, @jhenderson wrote:

> 2. There's a real-world use-case (which could be as simple as significantly simplifying our own testing or whatever).


There's a strong industrial use-case here, which is to use MSVC for compilation and LLD for linking.
MSVC currently doesn't support (yet?) `.debug$H` streams, and this patch provides a workaround. This inherently makes linking with LLD faster, by allowing compilation with MSVC + `.debug$H` computation on remote PCs (when using distributed compilation).
Without this patch, `.debug$H` computation is done locally by LLD, which significantly increases link time.

In D59025#1428431 <https://reviews.llvm.org/D59025#1428431>, @rupprecht wrote:

> I've never heard of ghashes


Worth the read: http://blog.llvm.org/2018/01/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59025


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190318/00bae8ea/attachment.html>


More information about the llvm-commits mailing list