LTO builds differ in substantial ways from a standard build of LLVM. In
particular, if the build happens to include static archives, then those
archives will contain LLVM bitcode, which may require special handling.
I'm not aware of an easy way to detect whether LLVM has been built with
LTO. This would be made much simpler if this were exported by
LLVMConfig.
For an example where this might be helpful, see:
https://github.com/banach-space/llvm-tutor/commit/af9d1935027ebd61287930f16c0b6ca2fe0845f2