[OCaml] Fix ocamlc -custom builds when configured as --enable-shared.
authorPeter Zotov <whitequark@whitequark.org>
Mon, 3 Nov 2014 09:51:37 +0000 (09:51 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Mon, 3 Nov 2014 09:51:37 +0000 (09:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221140 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/ocaml/Makefile.ocaml

index 387b851..26f82fa 100644 (file)
@@ -90,8 +90,9 @@ Compile.CMO  := $(strip $(OCAMLFIND) c -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o)
 Compile.CMX  := $(strip $(OCAMLFIND) opt -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o)
 
 ifdef OCAMLSTUBS
-Archive.CMA  := $(strip $(OCAMLFIND) c -a -dllib -l$(LIBRARYNAME) $(OCAMLDEBUGFLAG) \
-                                       -o)
+# -dllib is engaged with ocamlc builds, $(OCAMLSTUBFLAGS) in ocamlc -custom builds.
+Archive.CMA  := $(strip $(OCAMLFIND) c -a -dllib -l$(LIBRARYNAME) $(OCAMLSTUBFLAGS) \
+                                                                                                                                                        $(OCAMLDEBUGFLAG) -o)
 else
 Archive.CMA  := $(strip $(OCAMLFIND) c -a -custom $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) \
                                        -o)