[PATCH] D92844: [gn build] Link with -Wl,--gdb-index

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 11:36:12 PST 2020


aeubanks added a comment.

In D92844#2443293 <https://reviews.llvm.org/D92844#2443293>, @thakis wrote:

> In D92844#2442915 <https://reviews.llvm.org/D92844#2442915>, @aeubanks wrote:
>
>>>> 15% slower links seems noticeable. I'd prefer putting this behind a flag (can default to `is_debug` if you really want). I think putting all optional compiler/linker command line flags behind gn args makes sense.
>>>
>>> You're setting `is_debug=true` but you don't run the binary under gdb? If so, wy do you set `is_debug=true`? For stacks with line numbers?
>>
>> Yup
>
> Do you think we should have some mode to get `-g1` for that use case? I'd expect that to make your use case link faster than it currently does. (At least while we don't use fission, but even then it'll reduce .o file size which likely means faster build time with distributed compiles.) And then we could do the index only on `-g` not `-g1` builds.

Oh yes that would be ideal.


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

https://reviews.llvm.org/D92844



More information about the llvm-commits mailing list