CUDA: Clang support
- Clang identification.
- Crosscompilation support.
- Sysroot is passed during compiler identification.
-
CMAKE_CUDA_ARCHITECTURES
is respected during compiler identification if set in toolchain file.
- Compiler-specific module. Sets language flag and re-uses general Clang flags for the rest.
- Supports PTX compilation.
- Doesn't support separate compilation yet, as it works quite differently on Clang. Hope to add support in the future.
- Tests are updated to work with Clang.
-
pthread
,rt
anddl
are now considered a part of CUDA runtime libraries. - Some logic from
FindCUDAToolkit
is refactored intoInternal/CUDAToolkit
, so it can be usedCMakeDetermineCUDACompiler
.
Clang CUDA documentation.
Upstream LLVM CUDA developer's advice on CMake integration.
Fixes: #16586 (closed)
Topic-rename: cuda-clang