Skip to content
Open
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
3 changes: 2 additions & 1 deletion cpython-unix/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ if [ -n "${CPYTHON_OPTIMIZED}" ]; then
fi

if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_15}" ]]; then
patch -p1 -i "${ROOT}/patch-jit-llvm-version-3.15.patch"
# Python 3.15+ supports configuration via `LLVM_VERSION`
# https://github.com/astral-sh/python-build-standalone/issues/881
fi
fi
fi
Expand Down
9 changes: 9 additions & 0 deletions cpython-unix/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,15 @@ def build_cpython(
if "static" in parsed_build_options:
env["CPYTHON_STATIC"] = "1"

# Extract LLVM major version for JIT configuration
llvm_full_version = DOWNLOADS[clang_toolchain(host_platform, target_triple)][
"version"
]
if "+" in llvm_full_version:
llvm_full_version = llvm_full_version.split("+")[0]
# Get major version (e.g., "21" from "21.1.4")
env["LLVM_VERSION"] = llvm_full_version.split(".")[0]

add_target_env(env, host_platform, target_triple, build_env, build_options)

build_env.run("build-cpython.sh", environment=env)
Expand Down
12 changes: 0 additions & 12 deletions cpython-unix/patch-jit-llvm-version-3.15.patch

This file was deleted.

Loading