[clang] [llvm] [Clang][SYCL] Define Intel IGCA preprocessor macro definitions for SYCL during device compilation (PR #227877)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 8 12:32:06 PST 2026
================
@@ -326,6 +333,16 @@ class LLVM_LIBRARY_VISIBILITY BaseSPIRVTargetInfo : public BaseSPIRTargetInfo {
void getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const override;
+
+protected:
+ bool isSupportedOffloadArch(OffloadArch Arch) const override {
+ // Chipstar, vulkan, and amdhsa triples shouldn't accept a -target-cpu.
+ if (getTriple().getOS() != llvm::Triple::UnknownOS)
----------------
tahonermann wrote:
This should accept `OpenCL` as well.
```suggestion
llvm::Triple::OSType OS = getTriple().getOS();
if (OS != llvm::Triple::UnknownOS && OS != llvm::Triple::OpenCL)
```
https://github.com/llvm/llvm-project/pull/227877
More information about the cfe-commits
mailing list