GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-138451: Support custom LLVM installation path by xhochy · Pull Request #138452 · python/cpython

Conversation

@xhochy

@xhochy xhochy commented Sep 3, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes #138451

Add support for explicitly defined LLVM installation location.

This is necessary as MSVC now comes with its own LLVM installation and activating MSVC via vcvars.bat will put LLVM tools on the PATH before the local ones.

You can see this in usage in conda-forge's latest Python 3.13 build: conda-forge/python-feedstock#807

  • Issue: Wrong LLVM tools picked up if using MSVC activation and custom LLVM build #138451

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@xhochy
xhochy requested review from brandtbucher, diegorusso and savannahostrowski as code owners September 3, 2025 14:53
@python-cla-bot

python-cla-bot Bot commented Sep 3, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Sep 3, 2025
@bedevere-app

bedevere-app Bot commented Sep 3, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot mentioned this pull request Sep 3, 2025
Wrong LLVM tools picked up if using MSVC activation and custom LLVM build #138451
Closed
@xhochy xhochy mentioned this pull request Sep 3, 2025
python v3.13.7 conda-forge/python-feedstock#807
Merged
3 tasks
Fidget-Spinner
Fidget-Spinner reviewed Sep 4, 2025
View reviewed changes
Comment thread Tools/jit/_llvm.py Outdated
async def _find_tool(tool: str, *, echo: bool = False) -> str | None:
# Explicitly defined LLVM installation location
if (llvm_root := os.getenv("LLVM_ROOT")) is not None:
path = os.path.join(llvm_root, "bin", tool)

@Fidget-Spinner Fidget-Spinner Sep 4, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all LLVM installation folders guaranteed to have the tool located in the $LLVM_ROOT/bin directory? I think it's somewhat risky to assume that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@xhochy xhochy Sep 5, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there is a LLVM_TOOLS_INSTALL_DIR in the CMakeLists to customize this: https://github.com/llvm/llvm-project/blob/74ec38fad0a1289f936e5388fa8bbe74653c55d9/llvm/CMakeLists.txt#L494

I should probably use that instead?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Fidget-Spinner Fidget-Spinner Sep 5, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that seems better

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@brandtbucher brandtbucher Sep 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is LLVM_TOOLS_INSTALL_DIR (or LLVM_ROOT for that matter) documented anywhere?

It seems like an env var used for building/installing LLVM itself, not necessarily something meant to be used after-the-fact by people trying to find LLVM. Or am I misunderstanding?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AA-Turner
AA-Turner requested a review from a team September 4, 2025 20:12
zooba
zooba reviewed Sep 5, 2025
View reviewed changes
Comment thread Tools/jit/_llvm.py Outdated
@_async_cache
async def _find_tool(tool: str, *, echo: bool = False) -> str | None:
# Explicitly defined LLVM installation location
if (llvm_tools_dir := os.getenv("LLVM_TOOLS_INSTALL_DIR")) is not None:

@zooba zooba Sep 5, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we document this somewhere? If it gets a NEWS entry, then we probably have (or need) a list of environment variables that may need to be set when building.

I'd expect the list to be in the devguide, really, which is a different repo. But do we have one in the main repo?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@zooba zooba Sep 5, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also:

Suggested change
if (llvm_tools_dir := os.getenv("LLVM_TOOLS_INSTALL_DIR")) is not None:
if llvm_tools_dir := os.getenv("LLVM_TOOLS_INSTALL_DIR")):

We shouldn't join to an empty value either (since that's interchangeable with "not set"). And possibly we should make sure it's an absolute path as well, though that may not matter so much.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Fidget-Spinner Fidget-Spinner Sep 5, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the JIT is still experimental, I don't think we should document this in the CPython docs. I agree that it should be in the devguide.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@xhochy xhochy Sep 7, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I did not know about the devguide before this review: Where should I add something? On first sight there was no section obvious to me.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@zooba zooba Sep 8, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it's somewhere on this page, but to be honest I didn't read the whole thing: https://github.com/python/devguide/blob/main/getting-started/setup-building.rst

Possibly we need a new section here anyway for building the JIT? @savannahostrowski @brandtbucher are there JIT-specific build docs somewhere to document a relevant environment variable?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@savannahostrowski savannahostrowski Oct 1, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have docs for building in https://github.com/python/cpython/blob/main/Tools/jit/README.md#building. We'd probably want to update this for now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@danigm danigm mentioned this pull request Sep 29, 2025
Make LLVM_VERSION configurable with env variable #138497
Closed
@xhochy
xhochy force-pushed the gh-138451 branch from 788de07 to be6b5b2 Compare October 26, 2025 10:21
@xhochy

xhochy commented Oct 26, 2025

Copy link
Copy Markdown
Contributor Author

Rebased and added documentation to the mentioned README. Is there anything more I can do here to get it merged?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

savannahostrowski
savannahostrowski reviewed Oct 26, 2025
View reviewed changes
Comment thread Misc/NEWS.d/next/Build/2025-09-03-14-55-59.gh-issue-138451.-Qzh2S.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

savannahostrowski
savannahostrowski requested changes Oct 26, 2025
View reviewed changes

@savannahostrowski savannahostrowski left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should make this a configure flag instead, like we did with #138498. That way, you can pass the flag into configure once (e.g., ./configure --with-llvm-tools-dir=/opt/homebrew/opt/llvm...) and then just run make without remembering to pass LLVM_TOOLS_INSTALL_DIR each time. That'd make it more consistent with other build options.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting changes and removed awaiting review labels Oct 26, 2025
@bedevere-app

bedevere-app Bot commented Oct 26, 2025

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xhochy
xhochy requested review from AA-Turner, corona10, emmatyping and erlend-aasland as code owners October 27, 2025 08:41
@xhochy

xhochy commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting change review and removed awaiting changes labels Oct 27, 2025
@bedevere-app

bedevere-app Bot commented Oct 27, 2025

Copy link
Copy Markdown

Thanks for making the requested changes!

@savannahostrowski: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app
bedevere-app Bot requested a review from savannahostrowski October 27, 2025 10:51
savannahostrowski
savannahostrowski reviewed Oct 30, 2025
View reviewed changes
Comment thread Tools/jit/README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Tools/jit/_llvm.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

zooba
zooba reviewed Oct 30, 2025
View reviewed changes
Comment thread configure.ac Resolved

Uh oh!

There was an error while loading. Please reload this page.

@xhochy
xhochy requested a review from zooba December 2, 2025 14:36
savannahostrowski
savannahostrowski approved these changes Dec 2, 2025
View reviewed changes

@savannahostrowski savannahostrowski left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment but I think this looks good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Build/2025-09-03-14-55-59.gh-issue-138451.-Qzh2S.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting change review labels Dec 2, 2025
@xhochy
Be more specific in NEWS entry
4801b37
@chris-eibl

chris-eibl commented Dec 2, 2025

Copy link
Copy Markdown
Member

activating MSVC via vcvars.bat will put LLVM tools on the PATH

I think this is the same problem I've faced in #141967 (comment), so thanks for doing this!

I've noticed there, that e.g. running

build.bat --experimental-jit --tail-call-interp "/p:PlatformToolset=ClangCL" "/p:LLVMInstallDir=<my-path-to>\llvm-21.1.4.0" "/p:LLVMToolsVersion=21"

will smuggle in the include path of the clang specified on the command line in front of the environment variable

INCLUDE=<my-path-to>\llvm-21.1.4.0\lib\clang\21\include;<other include paths>

which the hard coded (and maybe different) clang version used in the jit builds doesn't like depending on the version mismatch ...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Dec 2, 2025

Copy link
Copy Markdown
Member

LLVMInstallDir is the variable documented here https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170 which we already use at various places like

cpython/PCbuild/python.props

Lines 23 to 31 in 8801c6d

<!--
This ensures, that in case of clang-cl bundled with VS
we find e.g. clang_rt.profile.lib in the correct bitness.
In case the user sets LLVMInstallDir and LLVMToolsVersion,
they are responsible to use the correct tool architecture.
For details please see GH-131473.
-->
<PreferredToolArchitecture Condition="$(LLVMInstallDir) == '' and $(PlatformToolset) == 'ClangCL' and $(Platform) == 'x64'">x64</PreferredToolArchitecture>
<PreferredToolArchitecture Condition="$(LLVMInstallDir) == '' and $(PlatformToolset) == 'ClangCL' and $(Platform) == 'Win32'">x86</PreferredToolArchitecture>

cpython/PCbuild/pyproject-clangcl.props

Line 31 in 8801c6d

Command='"$(LLVMInstallDir)\bin\llvm-profdata.exe" merge -output="$(OutDir)instrumented\profdata.profdata" "$(OutDir)instrumented\*_*.profraw"' />

cpython/PCbuild/readme.txt

Lines 69 to 73 in 8801c6d

You can also use a specific version of clang-cl downloaded from
https://github.com/llvm/llvm-project/releases, e.g.
clang+llvm-18.1.8-x86_64-pc-windows-msvc.tar.xz.
Given you have extracted that to <my-clang-dir>, you can use it like so
build.bat --pgo "/p:PlatformToolset=ClangCL" "/p:LLVMInstallDir=<my-clang-dir>" "/p:LLVMToolsVersion=18"

Does that mean that we have to specify the additional LLVM_TOOLS_INSTALL_DIR variable to let the jit build pick up the same clang that is used for building cPython?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Dec 3, 2025

Copy link
Copy Markdown
Member

Does that mean that we have to specify the additional LLVM_TOOLS_INSTALL_DIR variable to let the jit build pick up the same clang that is used for building cPython?

There's no strict requirement for make/configure variables to match pcbuild.proj variables, but if it's specified as an environment variable then we should probably detect if it's set and copy it over the actual variable. That's one line in python.props. I wouldn't bother updating all the references, just do a read in one place.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Dec 3, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

IIUC, you mean setting LLVMInstallDir and LLVMToolsVersion based on LLVM_TOOLS_INSTALL_DIR and LLVM_VERSION?

I think it might be "too late", since AFAIR internally this is used by MS when preparing the environment according to "their" variable names, but we'll see.

What's definitely easy: just use the MS variable names here

    <Exec Command='$(PythonForBuild) "$(PySourcePath)Tools\jit\build.py" $(JITArgs) --output-dir "$(GeneratedJitStencilsDir)" --pyconfig-dir "$(PySourcePath)PC" --llvm-version="$(LLVM_VERSION)" --llvm-tools-install-dir="$(LLVM_TOOLS_INSTALL_DIR)"'/>

because, as you said

There's no strict requirement for make/configure variables

and just update the jit readme accordingly if we cannot map the variables easily "early" enough ...

Or we do it in build.bat. Let's see ...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Dec 3, 2025

Copy link
Copy Markdown
Member

Any file that sets PlatformToolset is loaded early enough to influence all the default settings in MSBuild, so it can certainly be set there. I believe that's only python.props, though it might be part/all of pyproject.props as well, but I think this is a better setting for python.props along with the other properties relating to external dependencies.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl chris-eibl mentioned this pull request Dec 11, 2025
GH-141362: Make get_externals handle fetching platform-specific release artifacts #142405
Merged
@xhochy

xhochy commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

@zooba @chris-eibl I'm a bit unsure what I need to do here to get this merged. Is there anything from your side that I should address in my code for windows builds?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Dec 16, 2025

Copy link
Copy Markdown
Member

First I thought we have these choices:

  1. do nothing, i.e. allow people specifying LLVMInstallDir the "regular" way to determine the clang-cl used for compiling Python and LLVM_TOOLS_INSTALL_DIR to specify the clang used for the jit stencils. With the potential drawback, that those two might interfere like I've mentioned above. It doesn't always happen and depends on the "compatibility" of the clang versions, so I thought most probably we should prohibit that (and don't force users to specify the same args twice).
  2. use just LLVMInstallDir and LLVMToolsVersion, i.e. different variables than on configure based builds
  3. if LLVM_TOOLS_INSTALL_DIR is specified, override LLVMInstallDir. Likewise for LLVM_VERSION / LLVMToolsVersion.
  4. if LLVMInstallDir is given, override LLVM_TOOLS_INSTALL_DIR. Likewise for LLVM_VERSION / LLVMToolsVersion.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Dec 16, 2025

Copy link
Copy Markdown
Member

I've first tried option 4 via adding

<LLVM_TOOLS_INSTALL_DIR Condition="$(LLVMInstallDir) != '' and $(LLVM_TOOLS_INSTALL_DIR) == ''">$(LLVMInstallDir)</LLVM_TOOLS_INSTALL_DIR>
<LLVM_VERSION Condition="$(LLVMToolsVersion) != '' and $(LLVM_VERSION) == ''">$(LLVMToolsVersion)</LLVM_VERSION>

to

cpython/PCbuild/regen.targets

Lines 122 to 127 in 8c87bcd

<PropertyGroup>
<JITArgs Condition="$(Platform) == 'ARM64'">aarch64-pc-windows-msvc</JITArgs>
<JITArgs Condition="$(Platform) == 'Win32'">i686-pc-windows-msvc</JITArgs>
<JITArgs Condition="$(Platform) == 'x64'">x86_64-pc-windows-msvc</JITArgs>
<JITArgs Condition="$(Configuration) == 'Debug'">$(JITArgs) --debug</JITArgs>
</PropertyGroup>

This would have been my preferred choice, because then we would not have to "teach something new" and could have the same variables on Windows / Linux.

However, if during installing of Visual Studio the bundled clang-cl is chosen to be installed, it turned out that LLVM_VERSION is always set to this bundled version, even if doing just a regular MSVC build. So option 2 and 4 are out ...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Dec 16, 2025

Copy link
Copy Markdown
Member

Implementing option 3 is easy, too: just add

<LLVMInstallDir Condition="$(LLVM_TOOLS_INSTALL_DIR) != ''">$(LLVM_TOOLS_INSTALL_DIR)</LLVMInstallDir>
<LLVMToolsVersion Condition="$(LLVM_VERSION) != ''">$(LLVM_VERSION)</LLVMToolsVersion>

after

cpython/PCbuild/python.props

Lines 30 to 32 in 8c87bcd

<PreferredToolArchitecture Condition="$(LLVMInstallDir) == '' and $(PlatformToolset) == 'ClangCL' and $(Platform) == 'x64'">x64</PreferredToolArchitecture>
<PreferredToolArchitecture Condition="$(LLVMInstallDir) == '' and $(PlatformToolset) == 'ClangCL' and $(Platform) == 'Win32'">x86</PreferredToolArchitecture>

Now we'd have to document that when overriding the clang used to build the jit stencils will chose that clang for building Python, too, if built with "/p:PlatformToolset=ClangCL".

So option 1 gives more flexibility, but needs (?) a warning and "specifying the same thing twice" might feel like a wart.
Option 3 needs even more documentation?

I am unsure what to do best, but considering the jit is maybe no longer experimental, we should care to find a good solution here?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fidget-Spinner

Fidget-Spinner commented Dec 16, 2025

Copy link
Copy Markdown
Member

I am unsure what to do best, but considering the jit is maybe no longer experimental, we should care to find a good solution here?

The JIT is still experimental, but Python build flags and in general build.bat flags are bound by backwards compatibility, so when adding things we have to treat it as non-experimental.

savannahostrowski and chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@savannahostrowski

savannahostrowski commented Jan 26, 2026

Copy link
Copy Markdown
Member

Just checking in here, is there anything else required for this one?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Jan 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Sorry, seems I've stalled this. IMHO we can handle the "clang version to build python" vs "clang version to build the jit" quirk in a follow-up PR? Especially since the first seems to be niche on Windows?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@savannahostrowski

savannahostrowski commented Feb 6, 2026

Copy link
Copy Markdown
Member

I think that's reasonable but I'd defer to @zooba on how he feels about that. I also don't want the follow up to get lost in the ether.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl chris-eibl mentioned this pull request Mar 20, 2026
LLVM 22 clang-cl on Windows fails for jit builds #146210
Closed
@chris-eibl

chris-eibl commented Mar 20, 2026

Copy link
Copy Markdown
Member

I think that's reasonable but I'd defer to @zooba on how he feels about that

I've furthermore tested this PR now locally successfully, too, in addition to my initial review(s).
@xhochy Thanks for this, nice improvement!
@zooba: any objections to merging this?

I also don't want the follow up to get lost in the ether.

I've created #146210.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl
chris-eibl self-requested a review March 20, 2026 14:24
chris-eibl
chris-eibl approved these changes Mar 20, 2026
View reviewed changes
@savannahostrowski
Merge branch 'main' into pythongh-138451
d5e2421
@zooba

zooba commented Apr 20, 2026

Copy link
Copy Markdown
Member

IMHO we can handle the "clang version to build python" vs "clang version to build the jit" quirk in a follow-up PR?

I'm not totally up on all the nuance here, but provided it works to regen explicitly with one version and then build without it automatically regenerating, this should be a non-issue (perhaps a bit annoying for someone who wants to work on the JIT on Windows and also compile with a different version of Clang, having to switch environment variables, but irrelevant for someone compiling with the same version or with MSVC even if they're regenerating the JIT stencils)?

The change itself looks fine to me. It just uses the environment variables directly (or overridden as /p: options to MSBuild), which is the "natural" way.

savannahostrowski reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@savannahostrowski
Merge branch 'main' into pythongh-138451
b3a330c
@savannahostrowski
savannahostrowski enabled auto-merge (squash) April 20, 2026 16:20
@savannahostrowski
savannahostrowski merged commit 5a3f479 into python:main Apr 20, 2026
82 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 20, 2026
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@xhochy @blurb-it
@zooba @savannahostrowski @ljfp
pythongh-138451: Support custom LLVM installation path (python#138452)
8184a72
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Steve Dower <[email protected]>
Co-authored-by: Savannah Ostrowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner left review comments
@savannahostrowski savannahostrowski savannahostrowski approved these changes
@chris-eibl chris-eibl chris-eibl approved these changes
@brandtbucher brandtbucher Awaiting requested review from brandtbucher brandtbucher is a code owner
@diegorusso diegorusso Awaiting requested review from diegorusso diegorusso is a code owner
@erlend-aasland erlend-aasland Awaiting requested review from erlend-aasland erlend-aasland is a code owner
@corona10 corona10 Awaiting requested review from corona10 corona10 is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@emmatyping emmatyping Awaiting requested review from emmatyping emmatyping is a code owner
@zooba zooba Awaiting requested review from zooba

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Wrong LLVM tools picked up if using MSVC activation and custom LLVM build

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@xhochy @chris-eibl @zooba @Fidget-Spinner @savannahostrowski @brandtbucher
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.