Cargo Features

llvm-ir has no features set by default.

llvm-ir = { version = "0.11.0", features = ["llvm-9", "llvm-10", "llvm-11", "llvm-12", "llvm-13", "llvm-14", "llvm-15", "llvm-16", "llvm-17", "llvm-9-or-greater", "llvm-10-or-greater", "llvm-11-or-greater", "llvm-12-or-greater", "llvm-13-or-greater", "llvm-14-or-greater", "llvm-15-or-greater", "llvm-16-or-greater", "llvm-17-or-greater", "llvm-9-or-lower", "llvm-10-or-lower", "llvm-11-or-lower", "llvm-12-or-lower", "llvm-13-or-lower", "llvm-14-or-lower", "llvm-15-or-lower", "llvm-16-or-lower", "llvm-17-or-lower", "strict-versioning", "prefer-dynamic"] }
llvm-9 = llvm-9-or-greater, llvm-9-or-lower, llvm-sys-90

Select the LLVM version to be compatible with.
You _must_ enable exactly one of the following features.

llvm-10 = llvm-10-or-greater, llvm-10-or-lower, llvm-sys-100
llvm-11 = llvm-11-or-greater, llvm-11-or-lower, llvm-sys-110
llvm-12 = llvm-12-or-greater, llvm-12-or-lower, llvm-sys-120
llvm-13 = llvm-13-or-greater, llvm-13-or-lower, llvm-sys-130
llvm-14 = llvm-14-or-greater, llvm-14-or-lower, llvm-sys-140
llvm-15 = llvm-15-or-greater, llvm-15-or-lower, llvm-sys-150
llvm-16 = llvm-16-or-greater, llvm-16-or-lower, llvm-sys-160
llvm-17 = llvm-17-or-greater, llvm-17-or-lower, llvm-sys-170
llvm-9-or-greater llvm-10-or-greater? llvm-9?

For convenience, these automatically-enabled features allow us to avoid checking complex combinations of features all the time. They are not meant to be manually enabled; use the above llvm-x features instead

llvm-10-or-greater llvm-10? llvm-11-or-greater? = llvm-9-or-greater

Affects instruction::CmpXchg.weak, instruction::AtomicRMW.operation, instruction::Freeze

llvm-11-or-greater llvm-11? llvm-12-or-greater? = llvm-10-or-greater
llvm-12-or-greater llvm-12? llvm-13-or-greater? = llvm-11-or-greater
llvm-13-or-greater llvm-13? llvm-14-or-greater? = llvm-12-or-greater
llvm-14-or-greater llvm-14? llvm-15-or-greater? = llvm-13-or-greater

Affects instruction::GetElementPtr.source_element_type

llvm-15-or-greater llvm-15? llvm-16-or-greater? = llvm-14-or-greater

Affects instruction::Load.loaded_ty, instruction::Call.function_ty, terminator::Invoke.function_ty

llvm-16-or-greater llvm-16? llvm-17-or-greater? = llvm-15-or-greater
llvm-17-or-greater llvm-17? = llvm-16-or-greater

Affects instruction::Add.nuw, instruction::Add.nsw, instruction::Sub.nuw, instruction::Sub.nsw, instruction::Mul.nuw, instruction::Mul.nsw, instruction::UDiv.exact, instruction::SDiv.exact, instruction::Shl.nuw, instruction::Shl.nsw, instruction::LShr.exact, instruction::AShr.exact

llvm-9-or-lower llvm-9? = llvm-10-or-lower
llvm-10-or-lower llvm-10? llvm-9-or-lower? = llvm-11-or-lower
llvm-11-or-lower llvm-10-or-lower? llvm-11? = llvm-12-or-lower
llvm-12-or-lower llvm-11-or-lower? llvm-12? = llvm-13-or-lower
llvm-13-or-lower llvm-12-or-lower? llvm-13? = llvm-14-or-lower
llvm-14-or-lower llvm-13-or-lower? llvm-14? = llvm-15-or-lower

Affects constant::UDiv, constant::SDiv, constant::URem, constant::SRem, constant::FAdd, constant::FSub, constant::FMul, constant::FDiv, constant::FRem, constant::ExtractValue, constant::InsertValue

llvm-15-or-lower llvm-14-or-lower? llvm-15? = llvm-16-or-lower
llvm-16-or-lower llvm-15-or-lower? llvm-16? = llvm-17-or-lower

Affects constant::Select

llvm-17-or-lower llvm-16-or-lower? llvm-17?

The strict-versioning feature requires an exact match between the system LLVM version and the version selected with the above features.

The ? in the below ensures that we only enable the feature if the dependency is already present. This avoids activating all the optional dependencies when strict-versioning is activated.

Enables strict-versioning of optional llvm-sys ^100.2.0, optional llvm-sys ^110.0.0, optional llvm-sys ^120.2.0, optional llvm-sys ^130.0.0, optional llvm-sys ^140.0.0, optional llvm-sys ^150.1.0, optional llvm-sys ^160.1.2, optional llvm-sys ^170.0.1, and optional llvm-sys ^90.2.0


The prefer-dynamic feature is only available on llvm-sys versions >= 120.

Enables prefer-dynamic of optional llvm-sys ^120.2.0, optional llvm-sys ^130.0.0, optional llvm-sys ^140.0.0, optional llvm-sys ^150.1.0, optional llvm-sys ^160.1.2, and optional llvm-sys ^170.0.1

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

llvm-sys-90 llvm-9?

Enables llvm-sys ^90.2.0

llvm-sys-100 llvm-10?

Enables llvm-sys ^100.2.0

llvm-sys-110 llvm-11?

Enables llvm-sys ^110.0.0

llvm-sys-120 llvm-12?

Enables llvm-sys ^120.2.0

llvm-sys-130 llvm-13?

Enables llvm-sys ^130.0.0

llvm-sys-140 llvm-14?

Enables llvm-sys ^140.0.0

llvm-sys-150 llvm-15?

Enables llvm-sys ^150.1.0

llvm-sys-160 llvm-16?

Enables llvm-sys ^160.1.2

llvm-sys-170 llvm-17?

Enables llvm-sys ^170.0.1