Use a separate build directory for free-threading #260
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
I work on the drgn debugger, and with the recently added 3.13t builds in the manylinux docker, which enable the
--disable-gil
option, we started getting some build failures when building wheels. It turned out that the standard and free-threading builds of 3.13 both use the samebuild_temp
andbuild_lib
directories.Drgn has a bit of a customized build system which allows incremental builds within the
build_temp
directory, so the object files from 3.13 were getting reused for the free-threaded build, but the ABI is not compatible anymore. The result was an extension that segfaulted immediately on import.It seems that a standard distutils extension doesn't have incremental build support, so maybe overlapping
build_temp
andbuild_lib
directories isn't a huge problem. But looking through the code, it seems like distutils tries to avoid overlapping thesebuild_temp
andbuild_lib
directories where the compiler could get confused or produce incorrect results. So I thought this might be a suitable fix for distutils itself, rather than just in drgn's build system.Thanks!