[clang] [Clang] Add __has_target_builtin macro (PR #126324)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 13 05:46:56 PST 2025


AaronBallman wrote:

> > > That's what the initial proposal / patch was, but that got reverted because it broke some CUDA on Arm sources. See #121839.
> > 
> > 
> > Yeah, but I'm suggesting that seems like a bug with CUDA on Arm sources. (But it also depends on how GCC behaves with offload targets; if they have the same wacky behavior, then it's not a bug.) If we agree that's a bug, it may change how we want to approach the fix here.
> 
> If changing the sources in an option I'm in favor of making `__has_builtin` work as the user would expect, but hacking around this stuff is par for the course in offloading land.

CC @jdoerfert (we don't have a CUDA maintainer, so I'm not certain who else to tag)

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


More information about the cfe-commits mailing list