summaryrefslogtreecommitdiff
path: root/bindings/ocaml
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-03-06 00:00:58 +0000
committerBob Wilson <bob.wilson@apple.com>2009-03-06 00:00:58 +0000
commit46c95bbe0616fc37cb56866a57939487f45eca00 (patch)
tree57dffd6067c2548b3ef4ab8a5b4f3fe1565dacb6 /bindings/ocaml
parentef0ff140a72c18893529c33cee8e7cd634b008bd (diff)
downloadllvm-46c95bbe0616fc37cb56866a57939487f45eca00.tar.gz
llvm-46c95bbe0616fc37cb56866a57939487f45eca00.tar.bz2
llvm-46c95bbe0616fc37cb56866a57939487f45eca00.tar.xz
Fix a parallel make race condition by swapping the order of -I directories.
The .cmi files are generated in $(ObjDir) and then copied to $(OcamlDir). The ocamldep output references the .cmi files in $(ObjDir), so make kicks off a dependent compile as soon as the local copy is generated. If the copy to $(OcamlDir) is not complete at that point, the compiler will read the partially copied file and complain about a "Corrupted compiled interface". Searching $(ObjDir) first avoids this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/ocaml')
-rw-r--r--bindings/ocaml/Makefile.ocaml4
1 files changed, 2 insertions, 2 deletions
diff --git a/bindings/ocaml/Makefile.ocaml b/bindings/ocaml/Makefile.ocaml
index 9ca9fb742a..d98a489f7c 100644
--- a/bindings/ocaml/Makefile.ocaml
+++ b/bindings/ocaml/Makefile.ocaml
@@ -37,7 +37,7 @@ UsedLibNames = $(shell $(LLVM_CONFIG) --libnames $(UsedComponents))
endif
# Tools
-OCAMLCFLAGS += -I $(OcamlDir) -I $(ObjDir)
+OCAMLCFLAGS += -I $(ObjDir) -I $(OcamlDir)
ifneq ($(ObjectsO),)
OCAMLAFLAGS += $(patsubst %,-cclib %, \
$(filter-out -L$(LibDir),-l$(LIBRARYNAME) \
@@ -297,7 +297,7 @@ endif
$(ObjDir)/$(LIBRARYNAME).odoc: $(ObjectsCMI)
$(Echo) "Documenting $(notdir $@)"
- $(Verb) $(OCAMLDOC) -I $(OcamlDir) -I $(ObjDir) -dump $@ $(OcamlHeaders)
+ $(Verb) $(OCAMLDOC) -I $(ObjDir) -I $(OcamlDir) -dump $@ $(OcamlHeaders)
ocamldoc: $(ObjDir)/$(LIBRARYNAME).odoc