Issue 31332: Building modules by Clang with Microsoft CodeGen (original) (raw)

Microsoft released a new compiler for VC++ that complies with more of modern C++ than the standard compiler.

https://blogs.msdn.microsoft.com/vcblog/2016/03/31/clang-with-microsoft-codegen-march-2016-released/

Is it possible to support it by creating a new script based on Lib/distutils/msvccompiler.py to Lib/distutils and adding a new item in the following dictionary in Lib/distutils/ccompiler.py?

compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"), 'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"), 'cygwin': ('cygwinccompiler', 'CygwinCCompiler', "Cygwin port of GNU C Compiler for Win32"), 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler', "Mingw32 port of GNU C Compiler for Win32"), 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"), }

The executable of it is at C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ClangC2\bin\amd64. The help message of it is:

OVERVIEW: clang LLVM compiler

USAGE: clang.exe [options]

OPTIONS: -### Print (but do not run) the commands to run for this compilation --analyze Run the static analyzer -arcmt-migrate-emit-errors Emit ARC errors even if the migrator can fix them -arcmt-migrate-report-output Output path for the plist report -B2 Location of backend dll -bigobj Generate extended COFF format --cuda-device-only Do device-side CUDA compilation only --cuda-host-only Do host-side CUDA compilation only --cuda-path= CUDA installation path -cxx-isystem Add directory to the C++ SYSTEM include search path -c Only run preprocess, compile, and assemble steps -d2 Additional arguments to forward to the backend -dD Print macro definitions in -E mode in addition to normal output -dependency-dot Filename to write DOT-formatted header dependencies to -dependency-file Filename (or -) to write dependency output to -dM Print macro definitions in -E mode instead of normal output -emit-ast Emit Clang AST files for source inputs -emit-llvm Use the LLVM representation for assembler and object files -E Only run the preprocessor -faltivec Enable AltiVec vector initializer syntax -fansi-escape-codes Use ANSI escape codes for diagnostics -fapple-kext Use Apple's kernel extensions ABI -fapple-pragma-pack Enable Apple gcc-compatible #pragma pack handling -fapplication-extension Restrict code to those available for App Extensions -fasync-exceptions Catch SEH exceptions in catch-alls -fblocks Enable the 'blocks' language feature -fborland-extensions Accept non-standard constructs supported by the Borland compiler -fbuild-session-file= Use the last modification time of as the build session timestamp -fbuild-session-timestamp=