libllvm

The LLVM Compiler Infrastructure.

Latest version: 21.1.0

Add to xmake.lua

add_requires("libllvm 21.1.0")

Learn how to add and link packages with Xmake →

Information

Kind
library
Recipe updated
2026-05-01T23:52:37.000Z

Platforms

  • linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
  • bsd: i386, x86_64, arm, arm64, ppc, ppc64, ppc64el, riscv64, sparc64
  • cross: i386, x86_64, arm, armv7, arm64, mips, mips64, mips64el, riscv, riscv64, loong64, s390x, ppc, ppc64, ppc64el, sh4, sparc64
  • android: armeabi, armeabi-v7a, arm64-v8a, riscv64, x86, x86_64, mips, mip64
  • windows: x64
  • iphoneos: arm64, x86_64
  • macosx: x86_64, arm64

Options

bolt
Build bolt project. · Type: boolean · Default: false
clang
Build clang project. · Type: boolean · Default: true
clang_tools_extra
Build clang-tools-extra project. · Type: boolean · Default: false
compiler_rt
Build compiler-rt runtime. · Type: boolean · Default: false
exception
Enable C++ exception support for LLVM. · Type: boolean · Default: true
flang
Build flang project. · Type: boolean · Default: false
flang_rt
Build flang-rt runtime. · Type: boolean · Default: false
httplib
Enable cpp-httplib to support llvm-debuginfod serve debug information over HTTP. · Type: boolean · Default: false
libc
Build libc runtime. · Type: boolean · Default: false
libclc
Build libclc project. · Type: boolean · Default: false
libcxx
Build libcxx runtime. · Type: boolean · Default: false
libcxxabi
Build libcxxabi runtime. · Type: boolean · Default: false
libffi
Enable libffi to support the LLVM interpreter to call external functions. · Type: boolean · Default: false
libunwind
Build libunwind runtime. · Type: boolean · Default: false
lld
Build lld project. · Type: boolean · Default: false
lldb
Build lldb project. · Type: boolean · Default: false
llvm_libgcc
Build llvm-libgcc runtime. · Type: boolean · Default: false
mlir
Build mlir project. · Type: boolean · Default: false
ms_dia
Enable DIA SDK to support non-native PDB parsing. (msvc only) · Type: boolean · Default: true
offload
Build offload runtime. · Type: boolean · Default: false
openmp
Build openmp runtime. · Type: boolean · Default: false
polly
Build polly project. · Type: boolean · Default: false
pstl
Build pstl runtime. · Type: boolean · Default: false
rtti
Enable C++ RTTI support for LLVM. · Type: boolean · Default: true
target_aarch64
Build AArch64 target backend. · Type: boolean · Default: false
target_amdgpu
Build AMDGPU target backend. · Type: boolean · Default: false
target_arc
Build ARC experimental target backend. · Type: boolean · Default: false
target_arm
Build ARM target backend. · Type: boolean · Default: false
target_avr
Build AVR target backend. · Type: boolean · Default: false
target_bpf
Build BPF target backend. · Type: boolean · Default: false
target_csky
Build CSKY experimental target backend. · Type: boolean · Default: false
target_directx
Build DirectX experimental target backend. · Type: boolean · Default: false
target_hexagon
Build Hexagon target backend. · Type: boolean · Default: false
target_lanai
Build Lanai target backend. · Type: boolean · Default: false
target_loongarch
Build LoongArch target backend. · Type: boolean · Default: false
target_m68k
Build M68k experimental target backend. · Type: boolean · Default: false
target_mips
Build Mips target backend. · Type: boolean · Default: false
target_msp430
Build MSP430 target backend. · Type: boolean · Default: false
target_nvptx
Build NVPTX target backend. · Type: boolean · Default: false
target_powerpc
Build PowerPC target backend. · Type: boolean · Default: false
target_riscv
Build RISCV target backend. · Type: boolean · Default: false
target_sparc
Build Sparc target backend. · Type: boolean · Default: false
target_spirv
Build SPIRV target backend. · Type: boolean · Default: false
target_systemz
Build SystemZ target backend. · Type: boolean · Default: false
target_ve
Build VE target backend. · Type: boolean · Default: false
target_webassembly
Build WebAssembly target backend. · Type: boolean · Default: false
target_x86
Build X86 target backend. · Type: boolean · Default: false
target_xcore
Build XCore target backend. · Type: boolean · Default: false
target_xtensa
Build Xtensa experimental target backend. · Type: boolean · Default: false

Versions

  • 19.1.7
  • 21.1.0

Dependencies

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "libllvm 21.1.0"

show info

xrepo info "libllvm"

Link a library to your target

Declare the requirement, then attach the library to the target that uses it.

xmake.lua

add_requires("libllvm 21.1.0")

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("libllvm")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "libllvm 21.1.0" shell