[llvm-commits] [llvm] r66217 - /llvm/trunk/bindings/ocaml/Makefile.ocaml

Bob Wilson bob.wilson at apple.com
Thu Mar 5 16:00:59 PST 2009


Author: bwilson
Date: Thu Mar  5 18:00:58 2009
New Revision: 66217

URL: http://llvm.org/viewvc/llvm-project?rev=66217&view=rev
Log:
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.

Modified:
    llvm/trunk/bindings/ocaml/Makefile.ocaml

Modified: llvm/trunk/bindings/ocaml/Makefile.ocaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/Makefile.ocaml?rev=66217&r1=66216&r2=66217&view=diff

==============================================================================
--- llvm/trunk/bindings/ocaml/Makefile.ocaml (original)
+++ llvm/trunk/bindings/ocaml/Makefile.ocaml Thu Mar  5 18:00:58 2009
@@ -37,7 +37,7 @@
 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 @@
 
 $(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
 





More information about the llvm-commits mailing list