Skip to content

Commit 777002c

Browse files
committed
Fix LLVM-detection logic to notice when we have, or don't have, the ocaml bindings. Also XFAIL missed new case. Closes #102.
1 parent 3a08590 commit 777002c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,7 @@ CFG_GCC_CFLAGS :=
2323
CFG_GCC_LINK_FLAGS :=
2424
CFG_VALGRIND :=
2525

26-
# Issue #102, LLVM-config logic is assuming "presence of llvm-config"
27-
# means "presence of ocaml bindings". Commenting out for now.
28-
# CFG_LLVM_CONFIG := llvm-config
29-
30-
CFG_LLVM_CONFIG :=
26+
CFG_LLVM_CONFIG := llvm-config
3127
CFG_BOOT_FLAGS := $(FLAGS)
3228

3329
ifeq ($(CFG_OSTYPE), Linux)
@@ -165,6 +161,10 @@ ifneq ($(CFG_LLVM_CONFIG),)
165161
CFG_LLVM_VERSION := $(shell $(CFG_LLVM_CONFIG) --version)
166162
ifeq ($(CFG_LLVM_VERSION),2.8svn)
167163
$(info cfg: using LLVM version 2.8svn)
164+
WHERE := $(shell ocamlc -where)
165+
ifneq ($(shell test -e $(WHERE)/llvm.cma && echo ok),ok)
166+
CFG_LLVM_CONFIG := $(info cfg: LLVM ocaml bindings not found)
167+
endif
168168
else
169169
CFG_LLVM_CONFIG :=
170170
$(info cfg: incompatible LLVM version $(CFG_LLVM_VERSION), \
@@ -173,7 +173,6 @@ ifneq ($(CFG_LLVM_CONFIG),)
173173
endif
174174
ifdef CFG_LLVM_CONFIG
175175
VARIANT=llvm
176-
WHERE := $(shell ocamlc -where)
177176
LLVM_LIBS := llvm.cma llvm_bitwriter.cma
178177
LLVM_NATIVE_LIBS := llvm.cmxa llvm_bitwiter.cmxa
179178
LLVM_CLIBS := $(shell for c in `$(CFG_LLVM_CONFIG) --ldflags --libs` \
@@ -413,6 +412,7 @@ TEST_XFAILS_LLVM := $(addprefix test/run-pass/, \
413412
item-name-overload.rs \
414413
large-records.rs \
415414
lazy-and-or.rs \
415+
lazy-init.rs \
416416
lazychan.rs \
417417
linear-for-loop.rs \
418418
list.rs \

0 commit comments

Comments
 (0)