Expose initializing the native target for the execution engine.
[oota-llvm.git] / bindings / ocaml / executionengine / executionengine_ocaml.c
index 647759fb074424e85c95f934bbe41a0784519823..072d583bf8fb6976e65794c822b428dab627c453 100644 (file)
 #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