This is an archive of the discontinued LLVM Phabricator instance.

[LinkerWrapper] Fix optimized debugging builds for NVPTX LTO
ClosedPublic

Authored by jhuber6 on Sep 26 2022, 11:44 AM.

Details

Summary

The ptxas assembler does not allow the -g flag along with
optimizations. Normally this is degraded to line info in the driver, but
when using LTO we did not have this step and the linker wrapper was not
correctly degrading the option. Note that this will not work if the user
does not pass -g again to the linker invocation. That will require
setting some flags in the binary to indicate that debugging was used
when building.

This fixes #57990

Diff Detail

Event Timeline

jhuber6 created this revision.Sep 26 2022, 11:44 AM
jhuber6 requested review of this revision.Sep 26 2022, 11:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 26 2022, 11:44 AM
jdoerfert accepted this revision.Sep 27 2022, 7:16 AM

Better than before. Thx

This revision is now accepted and ready to land.Sep 27 2022, 7:16 AM