Skip to content

Commit 3c00136

Browse files
committed
env.pop("INCLUDE", None)
1 parent 48eb2ea commit 3c00136

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Tools/jit/_llvm.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,12 @@ async def _run(tool: str, args: typing.Iterable[str], echo: bool = False) -> str
4444
print(shlex.join(command))
4545

4646
if os.name == "nt":
47+
# When building with /p:PlatformToolset=ClangCL, the VS build
48+
# system puts that clang's include path into INCLUDE. The JIT's
49+
# clang may be a different version, and mismatched headers cause
50+
# build errors. See https://github.com/python/cpython/issues/146210.
4751
env = os.environ.copy()
48-
try:
49-
# When building with /p:PlatformToolset=ClangCL, the VS build
50-
# system puts that clang's include path into INCLUDE. The JIT's
51-
# clang may be a different version, and mismatched headers cause
52-
# build errors. See https://github.com/python/cpython/issues/146210
53-
del env["INCLUDE"]
54-
except KeyError:
55-
pass
52+
env.pop("INCLUDE", None)
5653
else:
5754
env = None
5855
try:

0 commit comments

Comments
 (0)