You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A possible approach is to pull in the libcxx C++ library and the musl C library. Then, pass -nostdinc to clang and also pass the locations of the libcxx and musl include files:
For libcxx this means the include directory that occurs in the root of the repository.
For musl this also means the include directory that occurs in the root of the repository. In addition, for 32-bit, and 64-bit pointers, pointers also arch/i386, and arch/x86_64, should be passed, respectively.
For the libraries to work correctly, a variation on the following will be required.
libcxx: define __ELF__ and _GNU_SOURCE. Add definitions of _LIBCPP_HAS_THREAD_API_PTHREAD and _LIBCPP_HAS_MUSL_LIBC to the start of __config.
musl: generate a bits/alltypes.h based on arch/.../bits/alltypes.h.in. This depends on the pointer width.
Besides the above, we will also need prototypes for CUDA runtime API functions (see runtime_patch.txt for a very minimal version).
CUDA mixed host/device source files are much better supported in Clang nowadays, it might be worth revisiting whether this can be supported.
The text was updated successfully, but these errors were encountered: