================ @@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + ---------------- Artem-B wrote:
Unfortunately, this will be observable to any code that happens to need those builtins, and they are actually not provided by the compiler (i.e. `__has_builtin(__wfi)` would be host on the *host*). In that case, any use of `__wfi()` in the host code will break compilation because host-side code will not be able to find it. I think a more robust fix would be to provide only declarations for these maybe-builtin functions, so the compiler always sees the correct signature of the functions that are conditionally provided depending on `__has_builtin()`. https://github.com/llvm/llvm-project/pull/128222 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits