-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenCL] Allow undefining header-only features
`opencl-c-base.h` always defines 5 particular feature macros for SPIR-V, making it impossible to disable those features. To allow disabling any of those features, let the header recognize `__undef_<feature>` macros. The user can then pass the `-D__undef_<feature>` flag on the command line to disable a specific feature. The __undef macro could potentially also be set from `-cl-ext=-feature`, but for now only change the header and only provide __undef macros for the 5 features that are always enabled in `opencl-c-base.h`. Differential Revision: https://reviews.llvm.org/D141297
- Loading branch information
Showing
2 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters