For generic targets such as SPIR-V clang sets all OpenCL extensions/features as supported by default. However targets are unlikely to support all extensions/features which creates a problem when such generic SPIR-V binary is compiled for a specific target later on.
For SPIR-V we will likely provide control of extensions via vendor components in the target triple: https://discourse.llvm.org/t/setting-version-environment-and-extensions-for-spir-v-target, however this doesn't eliminate the need of finer-grained control of extensions for example to support some specific or emerging target architectures.
Therefore this patch exposes -cl-ext flag for finer-grained control of extensions and features being targeted in the OpenCL kernels to improve error reporting and control of features generated in generic binaries like SPIR-V.
Was this meant to go after the command example?