Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ccfbf78
Move llvmlite to llvm19
yashssh Mar 26, 2025
04a1f68
Support building with LLVM20, add back codegen time passes APIs
yashssh May 29, 2025
47e299f
Remove LLVMLITE_ALIGN macro and unused value in LLVMPY_LLJIT_Link
yashssh May 29, 2025
30de275
Fix X86 failing tests with LLVM20
yashssh Jul 24, 2025
61d5d4e
Skip broken test_global_ctors_dtors on Darwin
yashssh Jul 24, 2025
3d81f0c
Reformat LLVM version check
yashssh Aug 20, 2025
9822d62
Merge branch 'main' into yashwants/llvm19
yashssh Aug 20, 2025
095858d
Comment out deperecated GDBJITDebugInfoRegistrationPlugin code causin…
yashssh Aug 20, 2025
b8843db
update conda channel for llvm-20 on wheel builder workflows
swap357 Aug 21, 2025
dce9f50
update conda channel for llvm-20 on conda builder workflow
swap357 Aug 21, 2025
d82bd05
update azure ci config and conda setup scripts to support llvmdev-20
swap357 Aug 21, 2025
0c6819a
update conda channel for llvm-20 on manylinux build script
swap357 Aug 21, 2025
c2a7629
update llvmdev version to 20.* on llvmlite conda recipe
swap357 Aug 21, 2025
30d21ef
update test_binding.py to assert llvm_assertions_state as "on" for al…
swap357 Aug 21, 2025
e6ff790
update llvm version on environment.yml and docs to 20.1.0
swap357 Aug 21, 2025
c17ba17
add ntdll.dll to expected imports on validate_win-64_wheel.py
swap357 Aug 21, 2025
990845a
add ntdll to expected imports on TestBuild for windows
swap357 Aug 21, 2025
c6b40c4
add ntdll to win wheel expected imports on TestBuild
swap357 Aug 21, 2025
23f78c8
add zstd to expected imports for windows conda on TestBuild
swap357 Aug 21, 2025
5f3e5bc
add corefoundation to expected imports for osx-64 conda and wheel on …
swap357 Aug 21, 2025
a67b9e9
add variables parameter to azure pipelines CI configs
swap357 Aug 21, 2025
de71d45
resolve flake8 issue on test_binding.py
swap357 Aug 21, 2025
d30d7c6
update llvmlite conda builder workflow to use py 3.12 on base
swap357 Aug 21, 2025
9cf580a
update llvmlite conda builder workflow to activate 'base' environment
swap357 Aug 21, 2025
03b6bb1
update llvmlite conda builder workflow to activate 'cibuild' environment
swap357 Aug 21, 2025
6f13d29
Run clang-format20 on ffi/*.cpp files
yashssh Aug 22, 2025
cda85cc
simplify llvmdev installation on setup scripts, remove support for ll…
swap357 Aug 22, 2025
390db9f
Apply suggestions from code review, use llvmdev=20
swap357 Aug 25, 2025
ed00df8
Apply suggestions from code review, remove py3.12 pin from miniconda …
swap357 Aug 25, 2025
299b412
add OrcDebugging
swap357 Aug 25, 2025
7d4fe41
Change initialize() to hard error out with useful information
sklam Aug 25, 2025
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
8 changes: 6 additions & 2 deletions .github/workflows/llvmlite_conda_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
with:
auto-update-conda: true
auto-activate-base: true
activate-environment: ""
activate-environment: cibuild
python-version: '3.12'

- name: Install conda-build
run: conda install conda-build
Expand All @@ -112,7 +113,7 @@ jobs:
if [ "${{ inputs.llvmdev_run_id }}" != "" ]; then
LLVMDEV_CHANNEL="file:///${{ github.workspace }}/llvmdev_conda_packages"
else
LLVMDEV_CHANNEL="numba"
LLVMDEV_CHANNEL="numba/label/dev"
fi
CONDA_CHANNEL_DIR="conda_channel_dir"
mkdir $CONDA_CHANNEL_DIR
Expand Down Expand Up @@ -144,6 +145,9 @@ jobs:
steps:
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
with:
activate-environment: cibuild
python-version: '3.12'

- name: Download llvmlite artifact
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/llvmlite_linux-64_wheel_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ concurrency:
cancel-in-progress: true

env:
FALLBACK_LLVMDEV_VERSION: "15"
CONDA_CHANNEL_NUMBA: numba/label/manylinux2014_x86_64
FALLBACK_LLVMDEV_VERSION: "20"
CONDA_CHANNEL_NUMBA: numba/label/llvm20-wheel
VALIDATION_PYTHON_VERSION: "3.12"
ARTIFACT_RETENTION_DAYS: 7
MANYLINUX_IMAGE: "manylinux2014_x86_64"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/llvmlite_linux-aarch64_wheel_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ concurrency:
cancel-in-progress: true

env:
FALLBACK_LLVMDEV_VERSION: "15"
CONDA_CHANNEL_NUMBA: numba/label/manylinux2014_aarch64
FALLBACK_LLVMDEV_VERSION: "20"
CONDA_CHANNEL_NUMBA: numba/label/llvm20-wheel
VALIDATION_PYTHON_VERSION: "3.12"
ARTIFACT_RETENTION_DAYS: 7
MANYLINUX_IMAGE: "manylinux_2_28_aarch64"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/llvmlite_osx-64_wheel_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ concurrency:
cancel-in-progress: true

env:
FALLBACK_LLVMDEV_VERSION: "15"
CONDA_CHANNEL_NUMBA: numba/label/osx_wheel
FALLBACK_LLVMDEV_VERSION: "20"
CONDA_CHANNEL_NUMBA: numba/label/llvm20-wheel
VALIDATION_PYTHON_VERSION: "3.12"
ARTIFACT_RETENTION_DAYS: 7

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/llvmlite_osx-arm64_wheel_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ concurrency:
cancel-in-progress: true

env:
FALLBACK_LLVMDEV_VERSION: "15"
CONDA_CHANNEL_NUMBA: numba/label/osx_wheel
FALLBACK_LLVMDEV_VERSION: "20"
CONDA_CHANNEL_NUMBA: numba/label/llvm20-wheel
VALIDATION_PYTHON_VERSION: "3.12"
ARTIFACT_RETENTION_DAYS: 7

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/llvmlite_win-64_wheel_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ concurrency:
cancel-in-progress: true

env:
FALLBACK_LLVMDEV_VERSION: "15"
CONDA_CHANNEL_NUMBA: numba/label/win64_wheel
FALLBACK_LLVMDEV_VERSION: "20"
CONDA_CHANNEL_NUMBA: numba/label/llvm20-wheel
VALIDATION_PYTHON_VERSION: "3.12"
ARTIFACT_RETENTION_DAYS: 7

Expand Down
2 changes: 1 addition & 1 deletion buildscripts/azure/azure-linux-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ parameters:

jobs:
- job: ${{ parameters.name }}
pool:
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
maxParallel: 11
Expand Down
1 change: 1 addition & 0 deletions buildscripts/github/validate_win-64_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"api-ms-win-crt-string-l1-1-0.dll",
"api-ms-win-crt-time-l1-1-0.dll",
"api-ms-win-crt-utility-l1-1-0.dll",
"ntdll.dll",
}
assert imports == expected_imports, (
f"Unexpected imports: {imports - expected_imports}\n"
Expand Down
4 changes: 0 additions & 4 deletions buildscripts/incremental/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,5 @@ call activate %CONDA_ENV%
@rem - https://github.com/conda-forge/llvmdev-feedstock/issues/175
@rem - https://github.com/conda-forge/llvmdev-feedstock/pull/223
@rem - https://github.com/MicrosoftDocs/visualstudio-docs/issues/7774
if "%LLVM%"=="16" (
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
if %errorlevel% neq 0 exit /b %errorlevel%
)

python setup.py build
10 changes: 2 additions & 8 deletions buildscripts/incremental/setup_conda_environment.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ if %errorlevel% neq 0 exit /b %errorlevel%
call activate %CONDA_ENV%
if %errorlevel% neq 0 exit /b %errorlevel%

@rem Install llvmdev
if "%LLVM%"=="16" (
set LLVMDEV_CHANNEL="conda-forge"
) else (
set LLVMDEV_CHANNEL="numba"
)

call conda install -y -q -c %LLVMDEV_CHANNEL% llvmdev="%LLVM%" libxml2
@rem Install llvmdev 20
call conda install -y -q -c numba/label/dev llvmdev=20 libxml2
if %errorlevel% neq 0 exit /b %errorlevel%
8 changes: 2 additions & 6 deletions buildscripts/incremental/setup_conda_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ set +v
source activate $CONDA_ENV
set -v

# Install llvmdev (separate channel, for now)
if [ "$LLVM" == "16" ]; then
$CONDA_INSTALL -c conda-forge llvmdev="16"
else
$CONDA_INSTALL -c numba llvmdev="15.*"
fi
# Install llvmdev 20
$CONDA_INSTALL -c numba/label/dev llvmdev=20

# Install the compiler toolchain, for osx, bootstrapping needed
# which happens in build.sh
Expand Down
9 changes: 1 addition & 8 deletions buildscripts/manylinux/build_llvmlite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ conda activate $envname
if [ -n "$LLVMDEV_ARTIFACT_PATH" ] && [ -d "$LLVMDEV_ARTIFACT_PATH" ]; then
conda install -y "$LLVMDEV_ARTIFACT_PATH"/llvmdev-*.conda --no-deps
else
if [[ $(uname -m) == "aarch64" ]] ; then
conda install -y numba/label/manylinux_2_28::llvmdev --no-deps
elif [[ $(uname -m) == "x86_64" ]] ; then
conda install -y numba/label/manylinux_2_17::llvmdev --no-deps
else
echo "Error: Unsupported architecture: $(uname -m)"
exit 1
fi
conda install -y -c numba/label/llvm20-wheel llvmdev=20 --no-deps
fi

# Prepend builtin Python Path
Expand Down
2 changes: 1 addition & 1 deletion conda-recipes/llvmlite/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ requirements:
- python
- setuptools
# On channel https://anaconda.org/numba/
- llvmdev 15.*
- llvmdev 20
- vs2015_runtime # [win]
# llvmdev is built with libz compression support
- zlib # [unix]
Expand Down
2 changes: 1 addition & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies:
- python
# pip for installing llvmlite itself
- pip
- llvmdev=15
- llvmdev=20
- cmake
- make
- docutils==0.16
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'llvm': ('http://llvm.org/releases/15.0.0/docs', None),
'llvm': ('https://releases.llvm.org/20.1.0/docs', None),
}

nitpicky = True
1 change: 0 additions & 1 deletion docs/source/user-guide/examples/ll_fpadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


# All these initializations are required for code generation!
llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter() # yes, even this one

Expand Down
1 change: 0 additions & 1 deletion docs/source/user-guide/examples/parseasm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from llvmlite import binding as llvm
from llvmlite import ir as lc

llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()

Expand Down
1 change: 0 additions & 1 deletion docs/source/user-guide/examples/sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import llvmlite.binding as llvm


llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()

Expand Down
1 change: 0 additions & 1 deletion examples/ll_fpadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


# All these initializations are required for code generation!
llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter() # yes, even this one

Expand Down
1 change: 0 additions & 1 deletion examples/lljit.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import llvmlite.binding as llvm
import numpy as np

llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter() # yes, even this one

Expand Down
1 change: 0 additions & 1 deletion examples/npm_passes.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
faulthandler.enable()

# All are required to initialize LLVM
llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()

Expand Down
1 change: 0 additions & 1 deletion examples/npm_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
faulthandler.enable()

# All are required to initialize LLVM
llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()

Expand Down
1 change: 0 additions & 1 deletion examples/opaque_pointers/sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import llvmlite.binding as llvm


llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()

Expand Down
1 change: 0 additions & 1 deletion examples/parseasm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from llvmlite import binding as llvm
from llvmlite import ir as lc

llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()

Expand Down
1 change: 0 additions & 1 deletion examples/sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import llvmlite.binding as llvm


llvm.initialize()
llvm.initialize_native_target()
llvm.initialize_native_asmprinter()

Expand Down
11 changes: 5 additions & 6 deletions ffi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

# NOTE: Keep this in sync with the version that llvmlite is declared to support
set(LLVMLITE_SUPPORTED_LLVM_VERSION_DEFAULT 15)
set(LLVMLITE_SUPPORTED_LLVM_VERSION_DEFAULT 20)

# Check LLVM version is supported or intentionally overridden.
if (NOT DEFINED LLVM_VERSION_MAJOR)
Expand Down Expand Up @@ -164,11 +164,10 @@ ${LLVM_ENABLE_RTTI}.")
endif()

# Define the shared library
add_library(llvmlite SHARED assembly.cpp bitcode.cpp core.cpp initfini.cpp
module.cpp value.cpp executionengine.cpp transforms.cpp type.cpp
passmanagers.cpp targets.cpp dylib.cpp linker.cpp object_file.cpp
custom_passes.cpp orcjit.cpp memorymanager.cpp newpassmanagers.cpp
config.cpp)
add_library(llvmlite SHARED assembly.cpp bitcode.cpp config.cpp core.cpp initfini.cpp
module.cpp value.cpp executionengine.cpp type.cpp
targets.cpp dylib.cpp linker.cpp object_file.cpp
custom_passes.cpp orcjit.cpp memorymanager.cpp newpassmanagers.cpp)


# Determine whether libstdc++ should be statically linked (or not).
Expand Down
1 change: 0 additions & 1 deletion ffi/PASSREGISTRY.def
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ MODULE_PASS("sample-profile", SampleProfileLoaderPass())
MODULE_PASS("scc-oz-module-inliner",buildInlinerPipeline(OptimizationLevel::Oz, ThinOrFullLTOPhase::None))
MODULE_PASS("pseudo-probe", SampleProfileProbePass(TM))
MODULE_PASS("strip-nonlinetable-debuginfo", StripNonLineTableDebugInfoPass())
MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation())
MODULE_PASS("trigger-crash", TriggerCrashPass())
MODULE_PASS("verify", VerifierPass())
MODULE_PASS("view-callgraph", CallGraphViewerPass())
Expand Down
4 changes: 0 additions & 4 deletions ffi/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ LLVMPY_DisposeString(const char *msg) { free(const_cast<char *>(msg)); }
API_EXPORT(LLVMContextRef)
LLVMPY_GetGlobalContext() {
auto context = LLVMGetGlobalContext();
// FIXME: Remove with LLVM >= 17.
LLVMContextSetOpaquePointers(context, true);
return context;
}

API_EXPORT(LLVMContextRef)
LLVMPY_ContextCreate() {
LLVMContextRef context = LLVMContextCreate();
// FIXME: Remove with LLVM >= 17.
LLVMContextSetOpaquePointers(context, true);
return context;
}

Expand Down
Loading
Loading