FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-146210: Fix building the jit stencils on Windows when the interpreter is built with a different clang version by chris-eibl · Pull Request #146338 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff 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.
12 changes: 11 additions & 1 deletion Tools/jit/_llvm.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,19 @@ 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":
# When building with /p:PlatformToolset=ClangCL, the VS build
# system puts that clang's include path into INCLUDE. The JIT's
# clang may be a different version, and mismatched headers cause
# build errors. See https://github.com/python/cpython/issues/146210.
env = os.environ.copy()
Comment thread
chris-eibl marked this conversation as resolved.
env.pop("INCLUDE", None)
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

Back | FazBrowse Home | New Git URL