bpo-33351: (WIP) Patches to build on clang-cl by emmatyping · Pull Request #7680 · python/cpython · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Include/pytime.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Port CPython to build with clang-cl on Windows.

Patch by Ethan Smith
15 changes: 11 additions & 4 deletions Modules/_tracemalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ static PyThread_type_lock tables_lock;

#define DEFAULT_DOMAIN 0

/* Pack the frame_t structure to reduce the memory footprint. */
/* Pack the pointer_t structure to reduce the memory footprint. */
#if defined(_MSC_VER)
#pragma pack(push, 4)
#endif
typedef struct
#ifdef __GNUC__
__attribute__((packed))
Expand All @@ -76,14 +79,18 @@ __attribute__((packed))
uintptr_t ptr;
unsigned int domain;
} pointer_t;
#ifdef _MSC_VER
#pragma pack(pop)
#endif

/* Pack the frame_t structure to reduce the memory footprint on 64-bit
architectures: 12 bytes instead of 16. */
architectures: 12 bytes instead of 16. */
#if defined(_MSC_VER)
#pragma pack(push, 4)
#endif
typedef struct
#ifdef __GNUC__
__attribute__((packed))
#elif defined(_MSC_VER)
#pragma pack(push, 4)
#endif
{
/* filename cannot be NULL: "<unknown>" is used if the Python frame
Expand Down
14 changes: 6 additions & 8 deletions PC/pyconfig.h