[clang] [clang][SYCL] Enable GPURelocatableDeviceCode and predefine __CLANG_RDC__ (PR #215437)

Nick Sarnie via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 12 11:54:31 PDT 2026


================
@@ -11,6 +11,12 @@ library. More details are provided in
 [external document](https://github.com/intel/llvm/blob/sycl/sycl/doc/design/CompilerAndRuntimeDesign.md),
 which are going to be added to clang documentation in the future.
 
+## Predefined Macros
+
+| Macro | Description |
+| --- | --- |
+| `__CLANG_RDC__` | Defined when Clang is compiling code in Relocatable Device Code (RDC) mode. RDC is necessary for linking device codes across translation units. It is enabled by default for SYCL and can be disabled with `-fno-gpu-rdc` compiler option. |
----------------
sarnex wrote:

```suggestion
| `__CLANG_RDC__` | Defined when Clang is compiling code in Relocatable Device Code (RDC) mode. RDC is necessary for linking device code across translation units. It is enabled by default for SYCL and can be disabled with the `-fno-gpu-rdc` compiler option. |
```

alternative :remove 'the' and 'option'

https://github.com/llvm/llvm-project/pull/215437


More information about the cfe-commits mailing list