[cfe-dev] how to generate both IR and object file
Jinwook Shin
Jinwook.Shin at microsoft.com
Mon Jun 23 13:51:31 PDT 2014
Thanks guys. Yes, it would be awesome to have this feature in the future
release.
Modifying the build environment as James suggested isn¹t an option for me
for political reasons with other teams I¹m working with.
On 6/22/14, 2:22 AM, "Alp Toker" <alp at nuanti.com> wrote:
>
>On 19/06/2014 23:38, Jinwook Shin wrote:
>> 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?
>
>That isn't supported by the standard driver and frontend but it's a
>perfectly reasonable feature to request.
>
>It's missing mostly for historical reasons -- the frontend action
>pipeline wasn't designed to be composable, meaning you can only do one
>thing per invocation.
>
>The limitation doesn't apply if you use the clang C++ API to build a
>custom tool.
>
>Alp.
>
>
>>
>> Thanks,
>> JS
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>--
>http://www.nuanti.com
>the browser experts
>
More information about the cfe-dev
mailing list