Skip to content

Commit

Permalink
[OCaml] Fix building of stub libraries
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194772 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
whitequark committed Nov 15, 2013
1 parent e016a16 commit 68f4dae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bindings/ocaml/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions bindings/ocaml/Makefile.ocaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -------------------------------------------------------===##
Expand Down
10 changes: 5 additions & 5 deletions bindings/ocaml/backends/backend_ocaml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
}

Expand Down

0 comments on commit 68f4dae

Please sign in to comment.