aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/Makefile b/src/Makefile
index 15bce37e..629150cf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -23,11 +23,7 @@ CFG_GCC_CFLAGS :=
CFG_GCC_LINK_FLAGS :=
CFG_VALGRIND :=
-# Issue #102, LLVM-config logic is assuming "presence of llvm-config"
-# means "presence of ocaml bindings". Commenting out for now.
-# CFG_LLVM_CONFIG := llvm-config
-
-CFG_LLVM_CONFIG :=
+CFG_LLVM_CONFIG := llvm-config
CFG_BOOT_FLAGS := $(FLAGS)
ifeq ($(CFG_OSTYPE), Linux)
@@ -137,6 +133,7 @@ ifdef PROFILE
$(info cfg: building with profiling info (forcing native output))
CFG_NATIVE := 1
CFG_OCAMLOPT_PROFILE_FLAGS := -p
+ NO_LLVM := 1
endif
ifdef DEBUG
@@ -165,6 +162,10 @@ ifneq ($(CFG_LLVM_CONFIG),)
CFG_LLVM_VERSION := $(shell $(CFG_LLVM_CONFIG) --version)
ifeq ($(CFG_LLVM_VERSION),2.8svn)
$(info cfg: using LLVM version 2.8svn)
+ WHERE := $(shell ocamlc -where)
+ ifneq ($(shell test -e $(WHERE)/llvm.cma && echo ok),ok)
+ CFG_LLVM_CONFIG := $(info cfg: LLVM ocaml bindings not found)
+ endif
else
CFG_LLVM_CONFIG :=
$(info cfg: incompatible LLVM version $(CFG_LLVM_VERSION), \
@@ -173,7 +174,6 @@ ifneq ($(CFG_LLVM_CONFIG),)
endif
ifdef CFG_LLVM_CONFIG
VARIANT=llvm
- WHERE := $(shell ocamlc -where)
LLVM_LIBS := llvm.cma llvm_bitwriter.cma
LLVM_NATIVE_LIBS := llvm.cmxa llvm_bitwiter.cmxa
LLVM_CLIBS := $(shell for c in `$(CFG_LLVM_CONFIG) --ldflags --libs` \
@@ -201,8 +201,9 @@ CFG_BOOT_FLAGS += -L .
# Boot targets and rules
######################################################################
-ML_INCS := -I boot/fe -I boot/me -I boot/be -I boot/driver/$(VARIANT) \
- -I boot/driver -I boot/util $(LLVM_INCS)
+ML_DEP_INCS := -I boot/fe -I boot/me -I boot/be -I boot/driver/$(VARIANT) \
+ -I boot/driver -I boot/util
+ML_INCS := $(ML_DEP_INCS) $(LLVM_INCS)
ML_LIBS := unix.cma nums.cma bigarray.cma
ML_NATIVE_LIBS := unix.cmxa nums.cmxa bigarray.cmxa
OCAMLC_FLAGS := -g $(ML_INCS) -w Ael -warn-error Ael
@@ -413,6 +414,7 @@ TEST_XFAILS_LLVM := $(addprefix test/run-pass/, \
item-name-overload.rs \
large-records.rs \
lazy-and-or.rs \
+ lazy-init.rs \
lazychan.rs \
linear-for-loop.rs \
list.rs \
@@ -464,6 +466,7 @@ TEST_XFAILS_LLVM := $(addprefix test/run-pass/, \
vec-append.rs \
vec-concat.rs \
vec-drop.rs \
+ vec-late-init.rs \
vec-slice.rs \
vec.rs \
writealias.rs \
@@ -681,11 +684,11 @@ C_DEPFILES := $(RUNTIME_CS:%.cpp=%.d)
%.d: %.ml $(MKFILES)
@$(call CFG_ECHO, dep: $<)
- $(CFG_QUIET)ocamldep$(OPT) $(ML_INCS) $< $(CFG_PATH_MUNGE) >$@
+ $(CFG_QUIET)ocamldep$(OPT) $(ML_DEP_INCS) $< $(CFG_PATH_MUNGE) >$@
%.d: %.mli $(MKFILES)
@$(call CFG_ECHO, dep: $<)
- $(CFG_QUIET)ocamldep$(OPT) $(ML_INCS) $< $(CFG_PATH_MUNGE) >$@
+ $(CFG_QUIET)ocamldep$(OPT) $(ML_DEP_INCS) $< $(CFG_PATH_MUNGE) >$@
ifneq ($(MAKECMDGOALS),clean)
-include $(ML_DEPFILES) $(C_DEPFILES)
@@ -728,7 +731,7 @@ PKG_3RDPARTY := rt/valgrind.h rt/memcheck.h \
rt/uthash/uthash.h rt/uthash/utlist.h \
rt/bigint/bigint.h rt/bigint/bigint_int.cpp \
rt/bigint/bigint_ext.cpp rt/bigint/low_primes.h
-PKG_FILES := README \
+PKG_FILES := README boot/README \
$(wildcard etc/*.*) \
$(MKFILES) $(BOOT_MLS) boot/fe/lexer.mll \
$(COMPILER_INPUTS) \