--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.
In gold-plugin, emit-llvm and save-temps are mutually-exclusive (last one wins) at the plugin level. With this, you get kindof a hybrid if both are specified: addSaveTemps code will essentially install a bunch of hooks including PostInternalizeModuleHook, but from what I can tell looking at the addSaveTemps code, it will recognize that PostInternalizeModuleHook is already set and ensure the original hook is invoked first. This means that you would get some of the save-temps output, but then at the post-internalization point you'll get this hook to write the bitcode to the output file and then stop. In some ways this seems nicer to me though. Not objecting, just noting the difference.