[cfe-dev] libtooling/libclang cannot find "__clang_cuda_runtime_wrapper.h"

Artem Belevich via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 7 15:19:18 PST 2018


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.

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.

--Artem

On Sun, Oct 14, 2018 at 2:13 AM Franklin He via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

>
> Hello
>
> I am attempting to write a static analyzer for CUDA using the Clang
> infrastructure.
>
> After writing a simple tool, and giving it the example CUDA file in
> https://llvm.org/docs/CompileCudaWithLLVM.html , I get the following
> error:
>
> fatal error: '__clang_cuda_runtime_wrapper.h' file not found
>
> so far this happens with both libtooling and libclang. I have tried using
> clang to compile the same CUDA file and it works.
> I am currently linking against clang sources from the trunk, but this also
> happens with Clang version 6.
> I currently have CUDA 10 installed on this computer.
>
> Any help would be appreciated.
>
> Regards
> Franklin
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>


-- 
--Artem Belevich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181107/025c16a7/attachment.html>


More information about the cfe-dev mailing list