All's in the title: I'd like to try using clang for compiling a C extension module for CPython on Linux (CPython comes from the distro repositories, and is built with gcc).

Do distutils/setuptools support this?
Does the fact that CPython and the extension are built with two different compilers matter?

Thanks.
There is a environment variable for that.
CC=clang python setup.py build
Both of compiled binaries are compatible with CPython
Is is possible to select clang for compiling CPython extensions on Linux?