Skip to content

Commit

Permalink
Fix LLVM-detection logic to notice when we have, or don't have, the o…
Browse files Browse the repository at this point in the history
…caml bindings. Also XFAIL missed new case. Closes rust-lang#102.
  • Loading branch information
graydon committed Jul 13, 2010
1 parent 3a08590 commit 777002c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -165,6 +161,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), \
Expand All @@ -173,7 +173,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` \
Expand Down Expand Up @@ -413,6 +412,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 \
Expand Down

0 comments on commit 777002c

Please sign in to comment.