[PATCH] D77231: [lld] Support -emit-asm with LTO

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 10:26:40 PDT 2020


hoyFB created this revision.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, MaskRay, hiraditya, arichardson, inglorion, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

The switch --plugin-opt=emit-asm can be used with the gold linker to dump the final assembly code generated by LTO in a user-friendly way. Unfortunately it doesn't work with lld. I'm hooking it up with lld. With that switch, lld emits assembly code into the output file (specified by -o) and if there are multiple input files, each of their assembly code will be emitted into a separate file named by suffixing the output file name with a unique number, respectively. The linking then stops after generating those assembly files.

Test Plan:


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77231

Files:
  lld/ELF/Config.h
  lld/ELF/Driver.cpp
  lld/ELF/LTO.cpp
  lld/ELF/Options.td
  lld/test/ELF/lto/emit-asm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77231.254245.patch
Type: text/x-patch
Size: 3890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200401/a168098a/attachment.bin>


More information about the llvm-commits mailing list