Add --plugin-opt=emit-llvm option.
authorRui Ueyama <ruiu@google.com>
Fri, 14 Dec 2018 21:58:49 +0000 (21:58 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 14 Dec 2018 21:58:49 +0000 (21:58 +0000)
commit9f49990976e88dde8902f18d023478e2fd567f3d
tree9aec8adc4ead7630acc06ee4ba1d2ea82ad44752
parent847e73d69c15626391da305609ae0282bee838fb
Add --plugin-opt=emit-llvm option.

`--plugin-opt=emit-llvm` is an option for LTO. It makes the linker to
combine all bitcode files and write the result to an output file without
doing codegen. Gold LTO plugin has this option.

This option is being used for some post-link code analysis tools that
have to see a whole program but don't need to see them in the native
machine code.

Differential Revision: https://reviews.llvm.org/D55717

llvm-svn: 349198
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/LTO.cpp
lld/ELF/Options.td
lld/test/ELF/lto/emit-llvm.ll [new file with mode: 0644]