[cfe-dev] How to compile the sources using Clang API?

Anton Smirnov dev at antonsmirnov.name
Thu May 29 22:49:58 PDT 2014


Thanks for showing direction!

Sorry, i did not catch that: in-memory linking is not possible at this time?


2014-05-27 23:57 GMT+06:00 Alp Toker <alp at nuanti.com>:

>
> On 27/05/2014 18:05, Anton Smirnov wrote:
>
>> Hey!
>>
>> I'm using Clang in my IDE on mobile devices as built-in analyzer and for
>> syntax highlighting. Can i (and how?) to compile the sources with Clang C++
>> API without executables running?
>>
>> I've found blog post about it (http://fdiv.net/2012/08/15/
>> compiling-code-clang-api), but it seems that `Driver` class runs `clang`
>> and `ld` executables behind the scene.
>>
>
> It's possible to short-circuit the clang -cc1 / -as invocation to run
> in-process with a minor code tweak to the driver (there was a patch on the
> list, but it's easy enough to do yourself if you take a look where the
> process is invoked).
>
> There's no easy way to do that for the linker invocation at present,
> however, since it's a distinct executable. Fortunately there are few linker
> invocations compared to the former during a typical compilation.
>
> It's likely we'll be investigating proper in-process compilation support
> in small steps over the next release cycle.
>
> Alp.
>
>
>
>> Anybody?
>>
>> Thanks and regards,
>> Anton.
>>
>>
>> _______________________________________________
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140530/ecefaf02/attachment.html>


More information about the cfe-dev mailing list