<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">It would help a lot if you could figure out what compiler options we end up using when the file is handled by libtooling or libclang. The fact that you've got the error means that the file *is* treated as a CUDA file (good news) but we either didn't add include path to clang headers, or the headers are not where they should be.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">I don't know if there's an easy way to do it libtooling or libclang. In the past I dug these options out with debugger. You can try passing '-v' and see if you get back the usual printout of header search path.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">--Artem</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Oct 14, 2018 at 2:13 AM Franklin He via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hello<br>
<br>
I am attempting to write a static analyzer for CUDA using the Clang infrastructure.<br>
<br>
After writing a simple tool, and giving it the example CUDA file in <a href="https://llvm.org/docs/CompileCudaWithLLVM.html" rel="noreferrer" target="_blank">https://llvm.org/docs/CompileCudaWithLLVM.html</a> , I get the following error:<br>
<br>
fatal error: '__clang_cuda_runtime_wrapper.h' file not found<br>
<br>
so far this happens with both libtooling and libclang. I have tried using clang to compile the same CUDA file and it works.<br>
I am currently linking against clang sources from the trunk, but this also happens with Clang version 6.<br>
I currently have CUDA 10 installed on this computer. <br>
<br>
Any help would be appreciated.<br>
<br>
Regards<br>
Franklin<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--Artem Belevich</div></div>