[OCaml] PR22014: OCaml bindings didn't link to libLLVM-*.so with -Wl,--as-needed
authorPeter Zotov <whitequark@whitequark.org>
Tue, 23 Dec 2014 13:09:59 +0000 (13:09 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Tue, 23 Dec 2014 13:09:59 +0000 (13:09 +0000)
Patch by Evangelos Foutras <evangelos@foutrelis.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224766 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/ocaml/Makefile.ocaml

index 5e00cf5..ac719de 100644 (file)
@@ -237,8 +237,8 @@ uninstall-local:: uninstall-shared
 
 $(SharedLib): $(ObjectsO) $(OcamlDir)/.dir
        $(Echo) "Building $(BuildMode) $(notdir $@)"
 
 $(SharedLib): $(ObjectsO) $(OcamlDir)/.dir
        $(Echo) "Building $(BuildMode) $(notdir $@)"
-       $(Verb) $(Link) $(SharedLinkOptions) $(OCAMLRPATH) $(LLVMLibsOptions) \
-                       -o $@ $(ObjectsO)
+       $(Verb) $(Link) $(SharedLinkOptions) $(OCAMLRPATH) -o $@ $(ObjectsO) \
+                       $(LLVMLibsOptions)
 
 clean-shared::
        -$(Verb) $(RM) -f $(SharedLib)
 
 clean-shared::
        -$(Verb) $(RM) -f $(SharedLib)