libcudacxx icon indicating copy to clipboard operation
libcudacxx copied to clipboard

Add support for testing libcudacxx with clang-cuda enabled.

Open wmaxey opened this issue 1 year ago • 0 comments

With a bit of hacking something like the below allows tests to pass. I find that I must still manually edit the lit.site.cfg to correctly point to libcuda.so. Will try to automate this in another PR.

cmake -S ./ -B ../build -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_CUDA_COMPILER=clang++-14 -DLIBCUDACXX_ENABLE_LIBCUDACXX_TESTS=ON -DLIBCUDACXX_COMPUTE_ARCHS=80

sed -i "s/int main/__host__ __device__ int main/g" $(find .upstream-tests/test/std/atomics/ -iname *.cpp)

wmaxey avatar Aug 19 '22 04:08 wmaxey