summaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-27 10:44:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-27 10:44:33 +0000
commitf859468f5a21b6952ab62917777f9fb3bba57003 (patch)
tree9794dc36f22f2a2b3f8063829d8a9b3a7794acc8 /bindings
parentf76359690a7035ad21498f2ba6be6991d3b2032d (diff)
Diffstat (limited to 'bindings')
-rw-r--r--bindings/ocaml/analysis/Makefile1
-rw-r--r--bindings/ocaml/bitreader/Makefile1
-rw-r--r--bindings/ocaml/bitwriter/Makefile1
-rw-r--r--bindings/ocaml/executionengine/Makefile1
-rw-r--r--bindings/ocaml/executionengine/executionengine_ocaml.c7
-rw-r--r--bindings/ocaml/llvm/Makefile1
-rw-r--r--bindings/ocaml/target/Makefile1
7 files changed, 7 insertions, 6 deletions
diff --git a/bindings/ocaml/analysis/Makefile b/bindings/ocaml/analysis/Makefile
index 0e95ecd678d5..cbfcb246704d 100644
--- a/bindings/ocaml/analysis/Makefile
+++ b/bindings/ocaml/analysis/Makefile
@@ -13,7 +13,6 @@
LEVEL := ../../..
LIBRARYNAME := llvm_analysis
-DONT_BUILD_RELINKED := 1
UsedComponents := analysis
UsedOcamlInterfaces := llvm
diff --git a/bindings/ocaml/bitreader/Makefile b/bindings/ocaml/bitreader/Makefile
index 6a11cc60da59..a1c7de895cf8 100644
--- a/bindings/ocaml/bitreader/Makefile
+++ b/bindings/ocaml/bitreader/Makefile
@@ -13,7 +13,6 @@
LEVEL := ../../..
LIBRARYNAME := llvm_bitreader
-DONT_BUILD_RELINKED := 1
UsedComponents := bitreader
UsedOcamlInterfaces := llvm
diff --git a/bindings/ocaml/bitwriter/Makefile b/bindings/ocaml/bitwriter/Makefile
index e57e3fe52cf2..cec0a59c31b6 100644
--- a/bindings/ocaml/bitwriter/Makefile
+++ b/bindings/ocaml/bitwriter/Makefile
@@ -13,7 +13,6 @@
LEVEL := ../../..
LIBRARYNAME := llvm_bitwriter
-DONT_BUILD_RELINKED := 1
UsedComponents := bitwriter
UsedOcamlInterfaces := llvm
diff --git a/bindings/ocaml/executionengine/Makefile b/bindings/ocaml/executionengine/Makefile
index 40fb98e1914a..5fa3f22048f4 100644
--- a/bindings/ocaml/executionengine/Makefile
+++ b/bindings/ocaml/executionengine/Makefile
@@ -13,7 +13,6 @@
LEVEL := ../../..
LIBRARYNAME := llvm_executionengine
-DONT_BUILD_RELINKED := 1
UsedComponents := executionengine jit interpreter native
UsedOcamlInterfaces := llvm llvm_target
diff --git a/bindings/ocaml/executionengine/executionengine_ocaml.c b/bindings/ocaml/executionengine/executionengine_ocaml.c
index ec403380ef44..647759fb0744 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. */
diff --git a/bindings/ocaml/llvm/Makefile b/bindings/ocaml/llvm/Makefile
index 3a06fb6a9abb..cd974d482011 100644
--- a/bindings/ocaml/llvm/Makefile
+++ b/bindings/ocaml/llvm/Makefile
@@ -13,7 +13,6 @@
LEVEL := ../../..
LIBRARYNAME := llvm
-DONT_BUILD_RELINKED := 1
UsedComponents := core
UsedOcamLibs := llvm
diff --git a/bindings/ocaml/target/Makefile b/bindings/ocaml/target/Makefile
index 5cd677b76656..3c48cd8fc208 100644
--- a/bindings/ocaml/target/Makefile
+++ b/bindings/ocaml/target/Makefile
@@ -13,7 +13,6 @@
LEVEL := ../../..
LIBRARYNAME := llvm_target
-DONT_BUILD_RELINKED := 1
UsedComponents := target
UsedOcamlInterfaces := llvm