classification
Title: Allow compiling Python with llvm-clang on Windows.
Type: compile error Stage:
Components: Cross-Build, Windows Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Alex.Willmer, Jeffrey.Kintscher, WildCard65, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-07-22 18:13 by William Pickard, last changed 2020-07-23 06:18 by Jeffrey.Kintscher.

Files
File name Uploaded Description Edit
build.log William Pickard, 2020-07-22 18:13 The MSBuild build log.
Messages (2)
msg374099 - (view) Author: William Pickard (William Pickard) Date: 2020-07-22 18:13
Since Visual Studio 2017, Microsoft has an optional C++ Desktop Development option for compiling C/C++ code with LLVM's Clang compiler.

It's called: Clang with Microsoft CodeGen.
While the code is parsed with LLVM's Clang parser, the code is generated with a MSVC compatible code generator (hence the "with Microsoft CodeGen" name suffix)

Currently, Python 3.10 is uncompilable with Clang, but I would appreciate it if it can be supported.

I have attached a build log from MSBuild, below is the commandline I used to run the build.

Start-Process -FilePath $(Join-Path $PCBUILD -ChildPath 'build.bat' -Resolve) -WorkingDirectory $PCBuild -NoNewWindow -RedirectStandardOut $BUILD_LOG -RedirectStandardError $BUILDERROR_LOG -ArgumentList '-m', '-v', '-c', 'Debug', '-p', 'x64', '-t', 'Build', '"/p:PlatformToolset=ClangCL"'
PS L:\GIT\cpython> Start-Process -FilePath $(Join-Path $PCBUILD -ChildPath 'build.bat' -Resolve) -WorkingDirectory $PCBuild -NoNewWindow -RedirectStandardOut $BUILD_LOG -RedirectStandardError $BUILDERROR_LOG -ArgumentList '-m', '-v', '-c', 'Debug', '-p', 'x64', '-t', 'Build', '"/p:PlatformToolset=ClangCL"'
msg374100 - (view) Author: William Pickard (WildCard65) * Date: 2020-07-22 18:46
Note: Apparently Google-OpenID login button created a seperate account... instead of finding this one.
History
Date User Action Args
2020-07-23 06:18:34Jeffrey.Kintschersetnosy: + Jeffrey.Kintscher
2020-07-22 18:46:03WildCard65setnosy: + WildCard65, - William Pickard
messages: + msg374100
2020-07-22 18:13:57William Pickardcreate