[llvm-dev] problem on compiling cuda program with clang++
李阳 via llvm-dev
llvm-dev at lists.llvm.org
Wed Oct 26 21:59:19 PDT 2016
Hi all,
I compiled the *llvm3.9* source code on the *Nvidia TX1* board. And now I
am following the document in the docs/CompileCudaWithLLVM.rst to compile
cuda program with clang++.
However, when I compile `axpy.cu` using `nvcc`, *nvcc* can generate the
correct the binary;
while compiling `axpy.cu` using clang++, the detailed command is `clang++
axpy.cu -o axpy --cuda-gpu-arch=sm_53 -L/usr/local/cuda/lib64
-lcudart_static -ldl -lrt -pthread`, *clang++* generate the following
error:`/usr/include/features.h:367:12: fatal error: 'sys/cdefs.h' file not
found
# include <sys/cdefs.h>`.
And I find that 'sys/cdefs.h' is included in the directory
`/usr/include/aarch64-linux-gnu/sys`.
Anybody ever came accross the same problems? Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161027/fed98caf/attachment-0001.html>
More information about the llvm-dev
mailing list