Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-146210: Fix building the jit stencils on Windows when the interpreter is built with a different clang version#146338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
chris-eibl wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromchris-eibl:gh146210
Open
Show file tree
Hide file tree
Changes fromall 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
Fix building the jit stencils on Windows when the interpreter is built with
a different clang version. Patch by Chris Eibl.
19 changes: 18 additions & 1 deletionTools/jit/_llvm.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,9 +42,26 @@ async def _run(tool: str, args: typing.Iterable[str], echo: bool = False) -> str
async with _CORES:
if echo:
print(shlex.join(command))

if os.name == "nt":
env = os.environ.copy()
try:
# https://github.com/python/cpython/issues/146210
# When the Python iterpreter is built with
# "/p:PlatformToolset=ClangCL" "/p:LLVMInstallDir=...""
# msbuild populates the INCLUDE variable based on this
# clang version, which might be different to the one used
# for building the jit stencils. Mixing those include paths
# can cause mysterious build errors, so we remove the
# variable from the environment when invoking LLVM tools.
del env["INCLUDE"]
except KeyError:
pass
else:
env = None
try:
process = await asyncio.create_subprocess_exec(
*command, stdout=subprocess.PIPE
*command, stdout=subprocess.PIPE, env=env
)
except FileNotFoundError:
return None
Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp