[OCaml] Fix building of stub libraries
authorPeter Zotov <whitequark@whitequark.org>
Fri, 15 Nov 2013 02:51:27 +0000 (02:51 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Fri, 15 Nov 2013 02:51:27 +0000 (02:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194772 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/ocaml/Makefile
bindings/ocaml/Makefile.ocaml
bindings/ocaml/backends/backend_ocaml.c

index 19ba3022454524a8352b71816bbe915ebd484ffd..44562fe8db382b2071a365a9ffb615a03f5ff9de 100644 (file)
@@ -9,7 +9,7 @@
 
 LEVEL := ../..
 DIRS = llvm bitreader bitwriter irreader analysis target executionengine \
-       transforms linker
+       transforms linker backends
 ExtraMakefiles = $(PROJ_OBJ_DIR)/Makefile.ocaml
 
 ocamldoc:
index 80dbf0fdd72d35e2b1adf021544679cbd838982a..98e5be9cbb02508898d8526eaf39527933a4b8f3 100644 (file)
@@ -142,7 +142,7 @@ OutputCMXA := $(LibraryCMXA:$(ObjDir)/%.cmxa=$(OcamlDir)/%.cmxa)
 endif
 
 ifdef OCAMLSTUBS
-SharedLib := $(OcamlDir)/dll$(LIBRARYNAME).$(SHLIBEXT)
+SharedLib := $(OcamlDir)/dll$(LIBRARYNAME)$(SHLIBEXT)
 endif
 
 ifdef TOOLNAME
@@ -163,7 +163,7 @@ DestCMXA := $(PROJ_libocamldir)/$(LIBRARYNAME).cmxa
 endif
 
 ifdef OCAMLSTUBS
-DestSharedLib := $(PROJ_libocamldir)/dll$(LIBRARYNAME).$(SHLIBEXT)
+DestSharedLib := $(PROJ_libocamldir)/dll$(LIBRARYNAME)$(SHLIBEXT)
 endif
 
 ##===- Dependencies -------------------------------------------------------===##
index fd6d06d90fbe483342e8c773813db104770a3b59..2d4ba852fda5c3a4b7d94046d907c86ff57279f4 100644 (file)
 #include "caml/alloc.h"
 #include "caml/memory.h"
 
+// TODO: Figure out how to call these only for targets which support them.
+// LLVMInitialize ## target ## AsmPrinter();
+// LLVMInitialize ## target ## AsmParser();
+// LLVMInitialize ## target ## Disassembler();
+
 #define INITIALIZER1(target) \
   CAMLprim value llvm_initialize_ ## target(value Unit) {  \
     LLVMInitialize ## target ## TargetInfo();              \
     LLVMInitialize ## target ## Target();                  \
     LLVMInitialize ## target ## TargetMC();                \
-    // TODO: Figure out how to call these only for targets \
-    // which support them.                                 \
-    // LLVMInitialize ## target ## AsmPrinter();           \
-    // LLVMInitialize ## target ## AsmParser();            \
-    // LLVMInitialize ## target ## Disassembler();         \
     return Val_unit;                                       \
   }