Cargo Features

LLVM_SYS has no features set by default.

[dependencies]
llvm-sys = { version = "181.0.0", features = ["strict-versioning", "no-llvm-linking", "disable-alltargets-init", "prefer-dynamic", "force-dynamic", "prefer-static", "force-static", "clang-sys", "tempfile"] }
strict-versioning

Require that the used version of LLVM exactly match that expected by this crate.

no-llvm-linking

Do not attempt to link against LLVM libraries (useful if a different crate in your dependency tree provides them instead).

disable-alltargets-init

Do not attempt to build the LLVM_InitializeAllTarget* functions. Useful if the build host doesn't have a copy of LLVM to compile/link against and you do not use any of those functions.

prefer-dynamic

Linking preference.
If none of these is selected, it defaults to force static linking to match the behaviour before this feature is introduced.
Prefer dynamic linking to LLVM library if possible.

force-dynamic

Force dynamic linking.

prefer-static

Prefer static linking to LLVM library if possible.

force-static

Force static linking

Features from optional dependencies

clang-sys implicit feature

Enables clang-sys

clang-sys:

Rust bindings for libclang

tempfile implicit feature

Enables tempfile

tempfile:

A library for managing temporary files and directories