mlc-llvm-static
An LLVM 23.1.1 development SDK distributed as Python-version-independent, platform-specific wheels. Manual workflow runs publish the native SDK and its matching all-target add-on to PyPI.
The SDK contains:
- PIC LLVM static libraries with native objects, without LTO bitcode.
- LLVM headers, including the matching generated configuration headers.
- Relocatable LLVM CMake exports and a Python
llvm-configcompatibility frontend. - Static zlib 1.3.1 and zstd 1.5.7, with their headers and license notices.
- The matching ORC runtime archive on Linux.
The base wheel contains X86 on x86_64/AMD64 hosts and AArch64 on arm64/aarch64
hosts. The exact-version mlc-llvm-static-extra-targets wheel adds all other
standard LLVM backends. Both are partitioned from one All-target build and own
disjoint files in the same static/lib directory. Build fingerprints reject
mismatched base/add-on artifacts, including different builds of the same version.
Experimental LLVM backends are excluded.
Installing the add-on selects the All profile automatically; removing it
restores Native without overwriting base-owned files. Set
MLC_LLVM_STATIC_PROFILE=native or all for an explicit profile. CMake users
can also set -DMLC_LLVM_STATIC_PROFILE=native or all. Generated target
initialization headers, target-availability macros, CMake exports, and the
configuration frontend use the same selection. Archives remain host-specific:
an x86_64 wheel's AArch64 backend is x86_64 code that generates AArch64 objects.
Cross-platform linking still needs a suitable linker, sysroot, and target runtime.
Other LLVM tools, Clang, LLD, MLIR, and shared LLVM libraries are excluded.
Optional compilers and vendor toolchains remain separate dependencies.
Optional DIA SDK, libpfm, ICU, iconv, and language-binding integrations are
disabled to keep the SDK independent of packages installed on its build host.
The wheel is a build dependency. Statically linked downstream wheels do not need to depend on this SDK at runtime.
See the dependency audit for optional-feature consequences, platform libraries, transitive linking, and requirements for additional backends. libxml2 is needed for LLVM's Windows manifest merger, which this profile disables; it is not required by the selected IR/code-generation/ORC paths. Host system and C++ runtimes remain downstream dependencies.
Install and locate
Install the native SDK, then add every standard code-generation backend if needed:
python -m pip install mlc-llvm-static
python -m pip install 'mlc-llvm-static[all]'
python -m mlc_llvm_static.config --prefix
python -m mlc_llvm_static.config --cmake-dir
python -m mlc_llvm_static.config --llvm-config
import mlc_llvm_static as llvm
print(llvm.get_prefix())
print(llvm.get_cmake_dir())
print(llvm.get_llvm_config())
print(llvm.metadata()["targets"])
The all extra pins the add-on to the base wheel's exact version, and the add-on
pins the base to that same version, including any RC suffix. The base wheel can
be installed on its own. Downloaded wheel files and GitHub release asset URLs
can also be passed to pip install; install both matching wheels explicitly
when using files or URLs.
The frontend supports --profile=native|all|auto and normal static LLVM queries,
including components, compiler flags, library paths/order, and system libraries.
It reads a build-generated component graph and requires Python 3.10+ at build
time. The upstream executable is retained only in the build/cache for comparison.
On Unix, static/bin/llvm-config is a standalone Python script; on Windows,
get_llvm_config() locates pip's console launcher in the Python environment.
For a copied SDK prefix on either platform, run
python /copied/prefix/bin/llvm-config.py. A copied Windows SDK is not a
standalone executable toolchain.
Pass LLVM_DIR explicitly so a system or Conda LLVM installation does not
accidentally supply different headers, libraries, or exports:
cmake -S . -B build \
-DLLVM_DIR="$(python -m mlc_llvm_static.config --cmake-dir)" \
-DCMAKE_PREFIX_PATH="$(python -m mlc_llvm_static.config --prefix)" \
-DZLIB_USE_STATIC_LIBS=ON
find_package(LLVM CONFIG REQUIRED)
llvm_map_components_to_libnames(LLVM_LIBS Core OrcJIT Support native)
target_include_directories(my_target SYSTEM PRIVATE ${LLVM_INCLUDE_DIRS})
separate_arguments(LLVM_FLAGS NATIVE_COMMAND "${LLVM_DEFINITIONS}")
target_compile_options(my_target PRIVATE ${LLVM_FLAGS})
target_link_libraries(my_target PRIVATE ${LLVM_LIBS})
For TIRx's existing command-based discovery, set TVM_TIRX_USE_LLVM to the result
of --llvm-config followed by --link-static. For the FFI ORC JIT addon, set
LLVM_PREFIX to the result of --prefix. Linux ORC runtime archives live under
lib/clang/<LLVM-major>/lib/, matching the addon's discovery convention.
Builds and publishing
The Build LLVM static SDK wheels workflow builds and verifies both wheel
families for Linux x86_64, Linux aarch64, macOS arm64 (14.0+), and Windows
AMD64/ARM64. Windows ARM64 uses a native Windows 11 runner, ARM64 Python, and
clang-cl with the ARM64 MSVC libraries and linker; its wheels use the
win_arm64 platform tag. Consumer verification uses MSVC on both Windows hosts.
Linux builds run in manylinux_2_28; Windows uses the MSVC dynamic CRT (/MD).
Relevant pull requests build and validate the wheels. Manual runs publish both
wheel families to PyPI, with version_suffix as the only input. Every run
validates every supported host platform. Publishing waits for every host's
validation and checks the complete wheel set and its metadata before uploading.
PyPI receives wheels only; source distributions are built for validation, since
these packages provide a prebuilt SDK.
The SDK is compiled once per host and partitioned into both wheel families.
Separate publishing jobs download their project's validated wheels and do not
build anything. Wait for both jobs to succeed before using the All profile from
the index. Publishing jobs reuse the validated artifacts and can be rerun
independently.
The workflow appends the optional version_suffix string to the pinned
LLVM_VERSION in _version.py, then validates and normalizes it with Python's
packaging version parser:
version_suffix |
Both package versions |
|---|---|
| Empty (default) | 23.1.1 |
rc0 |
23.1.1rc0 |
dev0 |
23.1.1.dev0 |
post0 |
23.1.1.post0 |
Other valid suffixes, including alpha/beta and combined suffixes, work the same way. Both distributions, wheel filenames, and exact-version requirements are stamped together. Cache restores require the exact recipe key; changing the package suffix reuses the same compiled LLVM SDK.
Python packaging normalizes 23.1.1.rc0 to 23.1.1rc0. To test an RC from PyPI,
pin it explicitly, for example:
python -m pip install 'mlc-llvm-static[all]==23.1.1rc0'
To enable PyPI publishing, configure a trusted publisher for each project using these settings:
| PyPI publisher field | Native SDK | Extra targets |
|---|---|---|
| Project | mlc-llvm-static |
mlc-llvm-static-extra-targets |
| Owner | mlc-ai |
mlc-ai |
| Repository | package |
package |
| Workflow filename | mlc_llvm_static_wheel.yml |
mlc_llvm_static_wheel.yml |
| Environment | pypi |
pypi-all-targets |
For projects that do not exist yet, register pending publishers for both names. PyPI requires pending publishers to have distinct identities for the repository/workflow/environment combination; the separate environments above allow both projects to be registered before their first upload. Existing projects can share a publisher, but this setup keeps the first release independent for each project. Use these same environment names in GitHub's environment settings when configuring protection rules. Each publishing job requests its own OIDC token; no PyPI API-token secret is required. After setup, dispatch this workflow with the desired version suffix. No workflow change is needed. Existing filenames on PyPI cause an error rather than being silently skipped.
Verification installs the wheel and copies its SDK to a new directory containing
spaces. It checks artifact hashes, llvm-config relocation, CMake import paths,
and absence of unrequested tools/shared libraries. A shared consumer then parses
LLVM IR, optimizes it, writes bitcode, and JIT-executes a function returning 42.
The consumer must not depend on dynamic LLVM, zlib, or zstd. Linux also checks
the required GLIBC/GLIBCXX/CXXABI symbol versions against the manylinux baseline.
The probe also round-trips both compression formats, reads compressed ELF DWARF,
and checks its exports, allowing LLVM's two forced GDB JIT hooks on Windows.
CI caches the raw All-target SDK by platform and a fingerprint of the compilation
and graph-generation recipe, including explicit CC/CXX overrides.
Frontend, packaging, and verification changes reuse
that build. Windows packaging uses llvm-objcopy on a copy of the raw archives
to remove unreferenced local labels and unused undefined declarations. Public
definitions, relocation/weak-reference targets, linker directive references,
COMDAT section definitions and key symbols, compiler feature flags, debug/PCH
metadata, and unwind data are retained.
Generic --strip-unneeded is unsuitable because
it removes COMDAT records required by MSVC's linker. Install LLVM's
llvm-objcopy as a build tool or set MLC_LLVM_STATIC_OBJCOPY to its path; the
tool is not included in either wheel. The resulting archive hashes and tool
version are included in the SDK fingerprint. The packager rejects any change to
public symbol definitions or non-debug section contents, including code, data,
and unwind information. Windows verification also links every archive member
using /WHOLEARCHIVE. All hosts use 7-Zip for stronger standard ZIP DEFLATE
encoding. Linux and macOS packaging fetch an official 7-Zip 26.05 binary with
a pinned SHA-256; Windows uses the installed 7-Zip. Set MLC_LLVM_STATIC_7ZIP
to use an existing executable, including for offline packaging. Neither
packaging tool is needed by installed consumers. Recompression runs after
retagging and preserves the unpacked files, permissions, and RECORD hashes.
Packaging fails if either wheel reaches 100,000,000 bytes. Linux/macOS archives
retain their original symbols and sections; lossless ZIP recompression reduces
downloads without changing the installed SDK size.
The packager compares native-component library queries with upstream
llvm-config. Wheel verification covers Native and All, explicit Native with
the add-on present, and add-on uninstall. It initializes every selected backend
and emits/parses x86_64, AArch64, RISC-V, and WebAssembly objects for All.
Use remote build machines for LLVM compilation. Source builds are explicitly opt-in to avoid a lengthy accidental build when a wheel is unavailable:
MLC_LLVM_STATIC_ALLOW_SOURCE_BUILD=1 CMAKE_BUILD_PARALLEL_LEVEL=8 \
python scripts/build_wheels.py --output wheelhouse
python scripts/verify_split_wheels.py wheelhouse
The source archive digests are pinned in scripts/prepare_llvm.py. Useful build
overrides:
MLC_LLVM_STATIC_SOURCE_CACHE: reusable directory of downloaded source archives.MLC_LLVM_STATIC_LLVM_SOURCE_DIR,MLC_LLVM_STATIC_ZLIB_SOURCE_DIR, andMLC_LLVM_STATIC_ZSTD_SOURCE_DIR: explicit source trees for development.MLC_LLVM_STATIC_BUILD_WORK: node-local directory for source extraction and LLVM objects, keeping slow shared filesystems out of compilation.MLC_LLVM_STATIC_PREFIX: repackage a raw All-target SDK produced by this recipe, or a staged Native SDK when invoking the base wheel's build backend. Its parent must contain the matchinglicenses/andstaticlib.json.
Build settings are Release, assertions off, RTTI on, exceptions off, PIC on, and
LTO off. staticlib.json records source hashes, selected targets, build settings,
and per-file hashes. Source overrides are development inputs and are not covered
by the pinned archive digests.
Static libraries and generated configuration must stay together. External Clang versions can compile native objects independently, but Clang producing LLVM IR for this SDK should use a tested matching LLVM release. Android and ROCm tools should come from their corresponding vendor toolchains.
Metadata
Release files for mlc-llvm-static 23.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| mlc_llvm_static-23.1.1-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details |
| mlc_llvm_static-23.1.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| mlc_llvm_static-23.1.1-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| mlc_llvm_static-23.1.1-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| mlc_llvm_static-23.1.1-py3-none-macosx_14_0_arm64.whl | Python 3 | none | macOS 14.0+ ARM64 | Details |
Total release size: 331.1 MB
Release files / mlc_llvm_static-23.1.1-py3-none-win_arm64.whl
| Download URL | mlc_llvm_static-23.1.1-py3-none-win_arm64.whl |
|---|---|
| Size | 67.3 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
533b6f60c74fb49f1677ae155353bf790346c975f9073e9ed80c11f4d9d0d45f
|
|
BLAKE2b-256 checksum How to use checksums |
fe2aa211a724fd4c660ea81249a6ecaf7e52d9337cf0a1f82ef24cdd6ae3b792
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_llvm_static-23.1.1-py3-none-win_amd64.whl
| Download URL | mlc_llvm_static-23.1.1-py3-none-win_amd64.whl |
|---|---|
| Size | 97.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6c0f580ed0a9eedea540714f6d562d54bc30846267d00fba057efafcc0c4a72a
|
|
BLAKE2b-256 checksum How to use checksums |
9543a5f17371f578beb95c60fa4115021711fe20916777906a798f6116538935
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_llvm_static-23.1.1-py3-none-manylinux_2_28_x86_64.whl
| Download URL | mlc_llvm_static-23.1.1-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 61.3 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
ec9a3eccf37361b558230cb78cf9acc854a8a92772303f8574cb09600de62969
|
|
BLAKE2b-256 checksum How to use checksums |
d1cfdfc04f2fbff270c29e66ec33902f4ef07e208a16d0938d813c7dc2ab932a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_llvm_static-23.1.1-py3-none-manylinux_2_28_aarch64.whl
| Download URL | mlc_llvm_static-23.1.1-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 59.3 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
2b3c443118996338051c4cb202a55d53543b09c34c99fa91e00d3f94629dd370
|
|
BLAKE2b-256 checksum How to use checksums |
b39b220eb9ebcf443d600dd0950f65505adee9c50ead53ad24f52c501f054617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_llvm_static-23.1.1-py3-none-macosx_14_0_arm64.whl
| Download URL | mlc_llvm_static-23.1.1-py3-none-macosx_14_0_arm64.whl |
|---|---|
| Size | 46.2 MB |
| Tags | Python 3 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7bac9b9b455f665e7eaac9be054b4203161392450875d4917265262e07e0b3d6
|
|
BLAKE2b-256 checksum How to use checksums |
84d9881a55e80e04be3e6f4bf62c364953397413f470dbd3deb251df9605664f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for mlc-llvm-static 23.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for mlc_llvm_static-23.1.1-py3-none-win_arm64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.