layout: page
title: EngineBuilder (

A convenient class for building Each EngineBuilder instance can only create one ExecutionEngine.



Create and return a new ExecutionEngine instance.

Raise llvm.LLVMException if the builder cannot create an ExecutionEngine base on the given configuration.


Force the output the output ExecutionEngine to be an LLVM IR interpreter.


Force the output the output ExecutionEngine to be a JIT engine.

opt(self, level)

Set the code generation optimization level for a JIT engine. Valid value of level is 0-3, inclusive. The default setting is 2. To use vector instructions, such as SSE on Intel processors, level must be 3 (aggressive).

Static Factory Methods


Create a new EngineBuilder. module must be a llvm.core.Module instance. Its ownership is transferred to the resulting ExecutionEngine. Therefore, it is impossible to create more than one ExecutionEngine with a single EngineBuilder

Table Of Contents

Previous topic

Next topic