Suggestion to enable CPU instruction extension automatically with clang-cl


In order to use a function from some CPU instruction extension in a source code file, a clang-cl command line option has to be used to enable the CPU instruction extension. For example, the command line option “-maes” is used to enable AES extension.

For Microsoft C/C++ compiler, the call to a CPU instruction extension function signals to the compiler that the instruction extension should be enabled.

By borrowing the idea that “using is enabling” from Microsoft C/C++ compiler, it will be easier to use clang-cl as the replacement of Microsoft C/C++ compiler


Joe Gong