[cfe-dev] how to generate both IR and object file

Jinwook Shin Jinwook.Shin at microsoft.com
Thu Jun 19 13:38:28 PDT 2014


Hi,

I use the -emit-llvm flag to generate IR files and use LTO to link them together to produce the final executable. Sometimes LTO gives me link-time errors, so I want to avoid using it, yet I need IR files.

Question: Is there a way to instruct clang to generate *both* an IR file and a regular object file at compile-time, and during the link time, use the object files only, while leaving out the IR files?

Thanks,
JS




More information about the cfe-dev mailing list