Displaying 1 result from an estimated 1 matches for "run_static_ctor".
Did you mean:
run_static_ctors
2007 Dec 23
0
[LLVMdev] Ocaml JIT example
...ere's an example of how to LLVM's JIT compiler/interpreter from Ocaml.
$ cat jithelloworld.ml
(* jithelloworld.ml *)
open Llvm
open Llvm_executionengine
let execute_function f m =
(* Set up the JIT. *)
let jit = ExecutionEngine.create (ModuleProvider.create m) in
ExecutionEngine.run_static_ctors jit;
(* Execute the function. *)
ignore (ExecutionEngine.run_function f [| |] jit);
(* Tear down the JIT. *)
ExecutionEngine.run_static_dtors jit;
ExecutionEngine.dispose jit
let build_module =
let m = create_module "jithelloworld" in
(* @greeting = global [14 x...