Skip to content

Make LLVM_VERSION configurable with env variable #138497

Description

@danigm

Right now the LLVM version used is hardcoded in _llvm.py file.

The version could be override using environment variables so downstream builders can choose a different version to build against when enabling experimental JIT.

Linked PRs

Activity

  1. added
    type-featureA feature request or enhancement
    buildThe build process and cross-build
    on Sep 4, 2025
  2. sobolevn commented on Sep 4, 2025

    @sobolevn
    Member

    I think that this can lead to a problem that people will supply versions of LLVM that are not supported.

  3. Fidget-Spinner commented on Sep 4, 2025

    @Fidget-Spinner
    Member

    Yeah we don't guarantee that we can build with a range of LLVM versions, only a specific one for the JIT.

  4. brandtbucher commented on Sep 8, 2025

    @brandtbucher
    Member

    I'm honestly on the fence about this. I agree that we should only officially support one version at a time, but in practice a few downstream distributors seem to be patching the LLVM version (either using a newer version on an older Python or an older version on a newer Python).

    Allowing the officially supported version to be overridden with an env var is probably okay, provided it's clear that we don't support any version other than the default. Like CFLAGS_JIT, this should probably be captured at configure-time and passed to the build script rather than discovered by the build script itself.

  5. diegorusso commented on Sep 26, 2025

    @diegorusso
    Contributor

    I arrive late to the party but wouldn't it also be useful if we could specify a path to a LLVM installation? There might be different cases for that:

    • pass different installations of the same version of LLVM (useful for development). Instead of doing the trick with paths, we point to the installation directory of llvm and it will be using that.
    • pass different versions of LLVM. Case is similar to the one of this issue but instead passing a number we pass the path.

    this doesn't replace the LLVM_VERSION but could be another way to specify what llvm to use.

  6. danigm commented on Sep 29, 2025

    @danigm
    ContributorAuthor

    I arrive late to the party but wouldn't it also be useful if we could specify a path to a LLVM installation? There might be different cases for that:

    * pass different installations of the same version of LLVM (useful for development). Instead of doing the trick with paths, we point to the installation directory of llvm and it will be using that.
    
    * pass different versions of LLVM. Case is similar to the one of this issue but instead passing a number we pass the path.
    

    this doesn't replace the LLVM_VERSION but could be another way to specify what llvm to use.

    There's a different PR to support custom LLVM installation path: #138452

  7. added a commit that references this issue on Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtopic-JITtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions