Currently Clang defines supported OpenCL extensions for each target, and there is a feature under review for defining supported extensions in header files.
OpenCL runtime needs a flexible way to define supported extensions for a device in a specific environment. It is desirable to be able to enable/disable support of an extension by command line options.
One possible solution is to use -D and -U followed by the name of an extension to enable or disable support of the extension.
There may be multiple -D and -U options, each of which is followed by the name of an extension.
Basically, when Clang decides whether an extension is supported, it not only uses Target information, but also checks if the macro with the same name is defined or undefined.
Your feedback is welcome.