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 | e46161f10c3e0c640b22e446b873df8b01413f52 (patch) | |
tree | eb4fdad4778b8f5a3e9948d70627239e00202fc7 /bindings | |
parent | ba2aa7859e7ae3b5276d902ed0edddbc5ec7355d (diff) | |
download | external_llvm-e46161f10c3e0c640b22e446b873df8b01413f52.zip external_llvm-e46161f10c3e0c640b22e446b873df8b01413f52.tar.gz external_llvm-e46161f10c3e0c640b22e446b873df8b01413f52.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/ocaml/executionengine/executionengine_ocaml.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bindings/ocaml/executionengine/executionengine_ocaml.c b/bindings/ocaml/executionengine/executionengine_ocaml.c index ec40338..647759f 100644 --- a/bindings/ocaml/executionengine/executionengine_ocaml.c +++ b/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. */ |