[llvm-bugs] [Bug 34379] CUDA compilation fails due to unknown type name '__device__' separate compilation and linking solves the problem

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 31 10:42:52 PDT 2017


Artem Belevich <tra at google.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |tra at google.com
         Resolution|---                         |WONTFIX

--- Comment #1 from Artem Belevich <tra at google.com> ---
#include of a CUDA file from inside a CPP file is not going to work as clang
has no idea that the source will have CUDA in it.

If you want to do it this way, you'll need to explicitly tell clang to compile
your top-level .cpp file as CUDA by passing '-x cuda' option.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170831/70b97da1/attachment.html>

More information about the llvm-bugs mailing list