Skip to content

Commit

Permalink
Include t in abiflags patch for free-threaded builds
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Sep 25, 2024
1 parent 16b6b22 commit ad4d435
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,10 @@ import sys
import sysconfig
# When doing cross builds, sysconfig still picks up abiflags from the
# host Python, which is never built in debug mode. Patch abiflags accordingly.
# host Python, which is never built in debug or free-threaded mode. Patch abiflags accordingly.
if os.environ.get("CPYTHON_FREETHREADED") and "t" not in sysconfig.get_config_var("abiflags"):
sys.abiflags += "t"
sysconfig._CONFIG_VARS["abiflags"] += "t"
if os.environ.get("CPYTHON_DEBUG") and "d" not in sysconfig.get_config_var("abiflags"):
sys.abiflags += "d"
sysconfig._CONFIG_VARS["abiflags"] += "d"
Expand Down

0 comments on commit ad4d435

Please sign in to comment.