Skip to content

Conversation

@boberfly
Copy link

@boberfly boberfly commented Sep 20, 2025

Added clang-cl support. I also have this at https://github.com/mnraker-pm/setuptools/tree/clangcl but saw that distutils exists separately and I guess is merged into setuptools from here.

I made this independently of #7 as I didn't see it until now.

The purpose/motivation at least for myself is to eventually cross-compile various projects from linux to windows via the clang-cl toolchain. I tested this with markupsafe from windows and clang-cl installed via vs_setup.

Added some basic tests to verify that the right executables are found and that the compiler_type is clangcl but this will more or less follow the same codepath as the msvc compiler.

With the DISTUTILS_USE_SDK environment variable enabled, the VCTOOLSINSTALLDIR and WINDOWSSDKDIR can be set externally from setuptools/distutils and this will be passed onto clang-cl and lld-link's /vctoolsdir and /winsdkdir flags, ideal for cross-compiling on non-windows platforms.

@boberfly boberfly force-pushed the clangcl branch 3 times, most recently from 945c511 to 72aaa37 Compare September 20, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant