diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-06-24 21:09:18 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-06-24 21:09:18 +0000 |
commit | a1d3e660aef0ad88553c1d9ded5fb672a8427f89 (patch) | |
tree | af2eb14e04ab60f44f0a82c6cede397d3d72747f /llvm/bindings/ocaml/executionengine | |
parent | c3aff2c3fae52960af8f780097bf351126bef2b1 (diff) | |
download | bcm5719-llvm-a1d3e660aef0ad88553c1d9ded5fb672a8427f89.tar.gz bcm5719-llvm-a1d3e660aef0ad88553c1d9ded5fb672a8427f89.zip |
Fix the Ocaml bindings for the ExecutionEngine: with the change to build
libraries instead of relinked objects, the interpreter, JIT, and native
target libraries were not being linked in to an ocaml program using the
ExecutionEngine.
llvm-svn: 74117
Diffstat (limited to 'llvm/bindings/ocaml/executionengine')
-rw-r--r-- | llvm/bindings/ocaml/executionengine/executionengine_ocaml.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/bindings/ocaml/executionengine/executionengine_ocaml.c b/llvm/bindings/ocaml/executionengine/executionengine_ocaml.c index ec403380ef4..647759fb074 100644 --- a/llvm/bindings/ocaml/executionengine/executionengine_ocaml.c +++ b/llvm/bindings/ocaml/executionengine/executionengine_ocaml.c @@ -16,6 +16,7 @@ \*===----------------------------------------------------------------------===*/ #include "llvm-c/ExecutionEngine.h" +#include "llvm-c/Target.h" #include "caml/alloc.h" #include "caml/custom.h" #include "caml/fail.h" @@ -23,6 +24,12 @@ #include <string.h> #include <assert.h> +/* Force the LLVM interpreter, JIT, and native target to be linked in. */ +void llvm_initialize(void) { + LLVMLinkInInterpreter(); + LLVMLinkInJIT(); + LLVMInitializeNativeTarget(); +} /* Can't use the recommended caml_named_value mechanism for backwards compatibility reasons. This is largely equivalent. */ |