[cfe-dev] [RFC] Adding driver option to emit assembly from LTO

Bakhvalov, Denis via cfe-dev cfe-dev at lists.llvm.org
Mon Mar 25 13:41:10 PDT 2019


Hi,

I want to propose adding driver option for emitting assembly from LTO stage.

I recently added a patch for doing so in LLVM gold linker plugin: https://reviews.llvm.org/D56114

I just thought that it might be convenient to have something like -flto-S or just -S that we can pass to the link command and have assembly output after LTO is done.

Right now -S option isn't doing anything useful if all the inputs are object files.

We might need an earlier loop over the input files to determine that they are all object files and then override the final phase to be only linking. I understand that we might have issues supporting different linkers and LTO plugins but anyway just wanted to know what community thinks about that.

Best regards,
Denis Bakhvalov.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190325/e1d64727/attachment.html>


More information about the cfe-dev mailing list