libcudacxx
libcudacxx copied to clipboard
Add support for testing libcudacxx with clang-cuda enabled.
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)