[cfe-dev] Clang to find its own headers

Máté Ferenc Nagy-Egri via cfe-dev cfe-dev at lists.llvm.org
Thu Jan 10 06:44:58 PST 2019

It might be true. clang.exe resides in


whereas the includes are in


so the way to reach them is ../../lib/clang/<version>/include

Can I change this with configuring Clang? I don’t see any CMake param to LLVM that would controll this. Is this hardcoded? Where must I patch it?

Feladó: Kim Gräsman via cfe-dev [via Clang Developers]
Elküldve: 2019. január 10., csütörtök 11:58
Címzett: Meteorhead
Tárgy: Re: Clang to find its own headers

On 2019-01-10 11:27, Máté Ferenc Nagy-Egri via cfe-dev wrote: 

> Hi! 
> Forgive my noobish question, I’m new to actually touching the Clang/LLVM 
> codebase. 
> Where is it coded how Clang finds its own headers from under 
> ’lib/clang/7.0.0/include’? I’m helping with the packaging of LLVM on 
> Windows for Vcpkg and the resulting Clang install doesn’t work, it fails 
> to finds its own headers. Are Clang installs relocatable? Vcpkg builds 
> packages out of source into a staging directory. If both Debug and 
> Release builds go fine, it does a few extra checks and copies the result 
> of the ’install’ target which went to the staging dir to its final 
> location. I don’t know if this workflow causes the problem or the layout 
> is different than what Clang would expect. 

On Posix Clang expects the internal include files to be present relative 
to the binary: ../lib/clang/<version>/include. Where "<version>" is the 
version of Clang. Not sure if the same is true on Windows. 

/Jacob Carlborg 

cfe-dev mailing list 
[hidden email] 

If you reply to this email, your message will be added to the discussion below:
To start a new topic under Clang Developers, email ml+s42468n42468h76 at n3.nabble.com 
To unsubscribe from Clang Developers, click here.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190110/a0120122/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 457F57AC99784404B0EFAE4997925A28.png
Type: image/png
Size: 148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190110/a0120122/attachment.png>

More information about the cfe-dev mailing list