diff --git a/cpython-windows/build.py b/cpython-windows/build.py index 47bdc493..c1864966 100644 --- a/cpython-windows/build.py +++ b/cpython-windows/build.py @@ -653,6 +653,10 @@ def run_msbuild( # This can also work around known incompatibilities with the Windows 11 # SDK as of at least CPython 3.9.7. f"/property:DefaultWindowsSDKVersion={windows_sdk_version}", + # Use ClangCL for better build and runtime performance + # https://github.com/python/cpython/issues/130090 + "/p:PlatformToolset=ClangCL", + "/p:PreferredToolArchitecture=%s" % platform, ] if freethreaded: @@ -1069,6 +1073,13 @@ def find_additional_dependencies(project: pathlib.Path): exts = ("lib", "exp") for ext in exts: + # On 3.14+, we're building with ClangCL which does not produce `.exp` + # files. + if ext == "exp" and python_majmin == "314": + # TODO(zanieb): Scope this specifically to use of ClangCL instead of + # MSVC / determine if it's a bug that this file is missing. + continue + source = outputs_path / ("python%s%s.%s" % (python_majmin, lib_suffix, ext)) dest = core_dir / ("python%s%s.%s" % (python_majmin, lib_suffix, ext)) log("copying %s" % source)