[cfe-dev] Default header search paths not included when compiling from libclang?

Sean Silva silvas at purdue.edu
Wed Jan 8 12:49:06 PST 2014


This recent thread may help you:
http://comments.gmane.org/gmane.comp.compilers.clang.devel/34192

-- Sean Silva


On Tue, Nov 19, 2013 at 5:52 PM, Val Markovic <val at markovic.io> wrote:

> From what I can gather, it appears that when compiling a C++ file with the
> clang binary, clang will use some default header search paths. But when
> trying to do the same from libclang, it won't. Is this caused by the clang
> driver/frontend distinction (I don't know much about it)?
>
> Specifically, I'm talking about this issue affecting the YouCompleteMe
> plugin: https://github.com/Valloric/YouCompleteMe/issues/303
>
> So, is there a way to get libclang to use the same header search paths
> that the clang binary does? If not, why not and could this be changed in
> future versions of libclang?
>
> If there's no way to get libclang to use the same header search paths by
> default, is there a way to extract them out of the libclang API so that the
> paths can then be provided in other libclang API calls? If not now, could
> libclang be changed to support this in the future?
>
> The current situation where libclang users are forced to recreate the
> default header search path logic for every OS is incredibly frustrating.
> YCM can't even call out to clang to extract the headers out of it with
> "echo | clang -v -E -x c++ -" because clang might not even be installed on
> the machine. We only have libclang to work with.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140108/cff31533/attachment.html>


More information about the cfe-dev mailing list