[cfe-dev] Paths to system header files

don hinton via cfe-dev cfe-dev at lists.llvm.org
Fri Feb 26 05:14:29 PST 2016


(sorry, left this out of last message)
or look at the code in lib/Driver/Tools.cpp where these variables are
processed.

On Fri, Feb 26, 2016 at 8:11 AM, don hinton <hintonda at gmail.com> wrote:

> There are some environment variables you can use, e.g, CPATH, etc.  Please
> take a look at the Environment section of this page for details, or look at
> the:
>
> http://clang.llvm.org/docs/CommandGuide/clang.html
>
>
> On Fri, Feb 26, 2016 at 5:48 AM, Manuel Klimek via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> On Fri, Feb 26, 2016 at 11:46 AM Jacob Carlborg via cfe-dev <
>> cfe-dev at lists.llvm.org> wrote:
>>
>>> On 2016-02-26 10:37, Pedro Delgado Perez via cfe-dev wrote:
>>> > Hello,
>>> >
>>> > Perhaps this question has been asked before, but I couldn't find a
>>> > proper solution for this issue. When I produce an executable and use it
>>> > in another machine, sometimes Clang is not able to find system header
>>> > files (for instance "limits.h") because the paths to find these headers
>>> > are relative to the location of the Clang libraries.
>>> >
>>> > All the same, when I'm using FIXED COMPILATION, I'm able to
>>> > automatically retrieve the paths to system headers of the machine where
>>> > the executable is being run. I mean, I retrieve the paths and add them
>>> > after "--" to the command through the option -isystem. However, when
>>> I'm
>>> > using JSON COMPILATION DATABASE, I can't do that, so in this case I
>>> > don't know how to solve this issue.
>>> >
>>> > What is the appropriate manner to handle this matter of the paths to
>>> > system header files?
>>>
>>> Not sure if ti's the most appropriate way of doing it but I'm embedding
>>> the internal Clang headers in my executable. This post [1] [2].
>>>
>>> [1]
>>>
>>> http://clang-developers.42468.n3.nabble.com/Builtin-headers-td4049705.html#message4049716
>>>
>>> [2]
>>>
>>> http://clang-developers.42468.n3.nabble.com/Builtin-headers-td4049705.html#message4049772
>>>
>>> --
>>> /Jacob Carlborg
>>>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160226/328128d5/attachment.html>


More information about the cfe-dev mailing list