================
@@ -252,6 +252,12 @@ void AMDGPUTargetInfo::getTargetDefines(const LangOptions
&Opts,
else
Builder.defineMacro("__R600__");
+ // The 'llvm' environment selects the upstream, ROCm Device Library-free
+ // device runtime. Expose it so headers can route to builtin/libclc/libc
+ // backed implementations instead of the ockl/ocml functions.
+ if (getTriple().getEnvironment() == llvm::Triple::LLVM)
+ Builder.defineMacro("__AMDGCN_LLVM__");
----------------
arsenm wrote:
I'm trying to move towards amdgpu over amdgcn naming. Should this also be a
more general llvm libc macro?
https://github.com/llvm/llvm-project/pull/203980
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits