Skip to content

Partial support for clang and Windows in configure #105790

Open
@TheShermanTanker

Description

@TheShermanTanker

Feature or enhancement

Enable building cpython on Windows through the traditional configure route, for instance with mingw32.

Pitch

Enables other compilers such as clang to build cpython on Windows, instead of constraining it to the traditional PCbuild toolchain, to narrow the gap between Unix and Windows styles in the build.

Previous discussion

Not Applicable

Note: Only allows configure to run outside of PCbuild on Windows, to successfully build cpython for Windows with clang, the following modification needs to be added to Setup.local:

array arraymodule.c
binascii binascii.c
cmath cmathmodule.c
math mathmodule.c
_md5 md5module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_MD5.c
_sha1 sha1module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA1.c
_sha2 sha2module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA2.c
_sha3 sha3module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA3.c _hacl/include
_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c
_statistics _statisticsmodule.c
_winapi _winapi.c
_random _randommodule.c
_bisect _bisectmodule.c
_heapq _heapqmodule.c
_lsprof _lsprof.c rotatingtree.c
mmap mmapmodule.c
_csv _csv.c
_struct _struct.c
_datetime _datetimemodule.c
_json _json.c
xxsubtype xxsubtype.c
_xxsubinterpreters _xxsubinterpretersmodule.c
_xxinterpchannels _xxinterpchannelsmodule.c
_multibytecodec cjkcodecs/multibytecodec.c
_codecs_cn cjkcodecs/_codecs_cn.c
_codecs_hk cjkcodecs/_codecs_hk.c
_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
_codecs_jp cjkcodecs/_codecs_jp.c
_codecs_kr cjkcodecs/_codecs_kr.c
_codecs_tw cjkcodecs/_codecs_tw.c
_pickle _pickle.c
_opcode _opcode.c
_contextvars _contextvarsmodule.c
_io _io/winconsoleio.c _io/iobase.c _io/_iomodule.c _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/stringio.c _io/textio.c

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsbuildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions