Skip to content

Conversation

@Eclips4
Copy link

@Eclips4 Eclips4 commented Nov 15, 2025

No description provided.

@Eclips4 Eclips4 requested a review from emmatyping as a code owner November 15, 2025 12:22
@Eclips4 Eclips4 marked this pull request as draft November 15, 2025 12:22
@Eclips4 Eclips4 changed the title Make it work on mac Make it build on mac Nov 15, 2025
@Eclips4 Eclips4 marked this pull request as ready for review November 15, 2025 15:06
Comment on lines +24 to +30
if normalized_path.startswith(SKIP_PREFIXES):
continue
if normalized_path in SKIP_EXACT:
continue
f.write(f"#include \"{normalized_path}\"\n")
if normalized_path == "Python/remote_debug.h":
f.write("#undef UNUSED\n")
Copy link
Author

@Eclips4 Eclips4 Nov 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because Include/internal/pycore_crossinterp_data_registry.h is deliberately unguarded. It is supposed to be included only through Include/internal/pycore_crossinterp.h.
The regenerated wrapper was including the registry header twice, once indirectly via pycore_crossinterp.h (correct) and once directly (incorrect). Clang encounters the second inclusion of that unguarded header and fails

custom_ldflags="-Wl,--defsym=PyInit_$mod=PyInit_$mod"
case $UNAME_SYSTEM in
Darwin*)
custom_ldflags="$custom_ldflags -Wl,-u,_PyInit_$mod"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should check to see if this works on Linux...

@emmatyping emmatyping merged commit 3dc0283 into emmatyping:rust-in-cpython Nov 15, 2025
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.

2 participants