1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

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.

llvm-svn: 66217
This commit is contained in:
Bob Wilson 2009-03-06 00:00:58 +00:00
parent ab9affc0bf
commit fbcb5235b0

View File

@ -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