From e66ae0045df038d3d8684e3f92c0d8523631d304 Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Fri, 15 Nov 2013 02:51:27 +0000 Subject: [PATCH] [OCaml] Fix building of stub libraries llvm-svn: 194772 --- bindings/ocaml/Makefile | 2 +- bindings/ocaml/Makefile.ocaml | 4 ++-- bindings/ocaml/backends/backend_ocaml.c | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bindings/ocaml/Makefile b/bindings/ocaml/Makefile index 19ba3022454..44562fe8db3 100644 --- a/bindings/ocaml/Makefile +++ b/bindings/ocaml/Makefile @@ -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: diff --git a/bindings/ocaml/Makefile.ocaml b/bindings/ocaml/Makefile.ocaml index 80dbf0fdd72..98e5be9cbb0 100644 --- a/bindings/ocaml/Makefile.ocaml +++ b/bindings/ocaml/Makefile.ocaml @@ -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 -------------------------------------------------------===## diff --git a/bindings/ocaml/backends/backend_ocaml.c b/bindings/ocaml/backends/backend_ocaml.c index fd6d06d90fb..2d4ba852fda 100644 --- a/bindings/ocaml/backends/backend_ocaml.c +++ b/bindings/ocaml/backends/backend_ocaml.c @@ -19,16 +19,16 @@ #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; \ }