title: Emitting a single IR bitcode File with LLVM LLD using CMake
body: <p>I'm using Ubuntu 16.04 x86_64 and LLVM 5.0 and would like to compile a project to a single LLVM IR bitcode file using CMake. I know there is a way to do this using the GOLD Linker with the LLVM Plugin and add the CMake linker flags "<em>-fuse-ld=gold -Wl,-plugin-opt=emit-llvm</em>" and the CXX flag "<em>-flto</em>". </p>
  
  <p>But when I try to compile the project with the LLVM LLD linker and the "<em>-fuse-ld=lld -Wl,-plugin-opt=emit-llvm</em>" respectively "<em>-flto</em>" Flag, the linker is generating a native executable and no LLVM IR file. I was searching for other LLD options to emit a LLVM IR file but found nothing.</p>
  
  <p>Is there a way (or option) to generate a single LLVM IR file using LLD?</p>