[llvm] [flang-rt] Define RT_CUDA_THIN_IO for the amdgcn build (PR #226307)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 05:37:28 PDT 2026
================
@@ -300,6 +300,8 @@ function (add_flangrt_library name)
$<$<COMPILE_LANGUAGE:CXX>:-nogpulib -flto -fvisibility=hidden>
$<$<COMPILE_LANGUAGE:Fortran>:-nogpulib -flto>
)
+ # descriptor-io.cpp is not part of the GPU build.
+ target_compile_definitions(${tgtname} PRIVATE RT_CUDA_THIN_IO=1)
----------------
jhuber6 wrote:
I'd prefer not to re-use 'CUDA' for this. Also I think doing this from CMake when it would easily be like this or something.
```c
#if defined(__CUDA__ARCH__) || defined(__NVPTX__) || defined(__AMDGPU__)
#define RT_THIN_IO
#endif
```
https://github.com/llvm/llvm-project/pull/226307
More information about the llvm-commits
mailing list