[cfe-dev] [RFC] OpenCL: Allow enabling/disabling an extension by command line options

Liu, Yaxun (Sam) via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 19 13:46:04 PDT 2016


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.

Thanks.

Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 11800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160919/a387f5d6/attachment-0001.bin>


More information about the cfe-dev mailing list