[cfe-dev] Builtin headers

Jacob Carlborg via cfe-dev cfe-dev at lists.llvm.org
Fri Feb 5 00:19:31 PST 2016


On 2016-02-04 15:43, Mikhail Ramalho via cfe-dev wrote:
> Hi Jacob,
>
> I couldn't get it working that way.

Hmm, strange. I just verified running my tool inside a docker container. 
I have three embedded internal Clang headers, it can find those but no 
other internal headers.

I'm not sure how the C++ interface works but I had to explicitly add the 
path to the virtual directory to the command line arguments. Basically 
what I have is a randomly generated string as the virtual directory, 
based on the root of the file system. The full path of the internal 
headers are the virtual directory plus the filename of the internal 
header. Example, the full path of "float.h" could be on Posix:

/94573920482/float.h

And on Windows:

C:\94573920482\float.h

The I add the virtual directory to the command line arguments:

-I/94573920482/

Not sure if any of that helps.

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list