[cfe-dev] Clang command line options

Mohammad Adil madil90 at gmail.com
Thu Feb 7 01:18:58 PST 2013

You interpreted the question correctly. My executable is not present in the
clang directory and therefore I was getting one path wrong, which soon
became apparent from the verbose output. For the time being I have added
the path through command line. I am interested in compiler theory and would
like to know why this problem is taking so long to fix? What are the
possible options and why makes it so hard to choose one? Thank you very
much for your help.


On Thu, Feb 7, 2013 at 7:58 AM, Sean Silva <silvas at purdue.edu> wrote:

> Short answer: <stdarg.h> is not found in that directory.
> Long answer: Clang (and the clang libraries) looks for <stdarg.h> and
> (other compiler-provided headers) in a hardcoded directory relative the the
> current executable. If your executable is not sitting inside alongside
> clang inside a clang installation dir or build dir, then the hardcoded path
> that it looks for won't contain the right headers (if your tool is in such
> a directory, then I have probably misdiagnosed your issue; I apologize).
> This has been a pain point for a long time and needs to be fixed, but we
> have not reached a consensus about the best way to go about it. <
> http://clang.llvm.org/docs/FAQ.html> will give you some insight into the
> issue.
> Dmitri, could you please update/rework <
> http://clang.llvm.org/docs/FAQ.html> so that it covers the way that
> madil90 has posed this question (regardless of whether or not I diagnosed
> this issue correctly)? Maybe we should have a dedicated question `why does
> clang not find some headers like "stddef.h" or "stdarg.h"`? The content
> should be written to fill the use case where we reply to these built-in
> header questions by just linking to the FAQ and have that give the user a
> useful understanding of the issue (and what they can do about it, and that
> they are not alone).
> -- Sean Silva

Mohammad Adil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130207/6970e807/attachment.html>

More information about the cfe-dev mailing list