Fix ocaml bindings for picky linkers. :)
authorGordon Henriksen <gordonhenriksen@mac.com>
Fri, 12 Oct 2007 19:48:13 +0000 (19:48 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Fri, 12 Oct 2007 19:48:13 +0000 (19:48 +0000)
Thanks to Török Edvin for helping to track this down.

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

bindings/ocaml/Makefile.ocaml

index fb03b1a..fa03c63 100644 (file)
@@ -38,8 +38,9 @@ endif
 # Tools
 OCAMLCFLAGS += -I $(OcamlDir) -I $(ObjDir)
 OCAMLAFLAGS += $(patsubst %,-cclib %, \
 # Tools
 OCAMLCFLAGS += -I $(OcamlDir) -I $(ObjDir)
 OCAMLAFLAGS += $(patsubst %,-cclib %, \
-                 $(filter-out -L$(LibDir),$(shell $(LLVM_CONFIG) --ldflags)) \
-                                $(UsedLibs) -l$(LIBRARYNAME))
+                 $(filter-out -L$(LibDir),-l$(LIBRARYNAME) \
+                                          $(shell $(LLVM_CONFIG) --ldflags)) \
+                                          $(UsedLibs))
 
 Compile.CMI  := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o)
 Compile.CMO  := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o)
 
 Compile.CMI  := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o)
 Compile.CMO  := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o)