summaryrefslogtreecommitdiffstats
path: root/bindings/ocaml/executionengine/executionengine_ocaml.c
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/ocaml/executionengine/executionengine_ocaml.c')
-rw-r--r--bindings/ocaml/executionengine/executionengine_ocaml.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bindings/ocaml/executionengine/executionengine_ocaml.c b/bindings/ocaml/executionengine/executionengine_ocaml.c
index 647759f..072d583 100644
--- a/bindings/ocaml/executionengine/executionengine_ocaml.c
+++ b/bindings/ocaml/executionengine/executionengine_ocaml.c
@@ -24,11 +24,15 @@
#include <string.h>
#include <assert.h>
-/* Force the LLVM interpreter, JIT, and native target to be linked in. */
+/* Force the LLVM interpreter and JIT to be linked in. */
void llvm_initialize(void) {
LLVMLinkInInterpreter();
LLVMLinkInJIT();
- LLVMInitializeNativeTarget();
+}
+
+/* unit -> bool */
+CAMLprim value llvm_initialize_native_target(value Unit) {
+ return Val_bool(LLVMInitializeNativeTarget());
}
/* Can't use the recommended caml_named_value mechanism for backwards
OpenPOWER on IntegriCloud