Skip to content

Commit

Permalink
Check the llvm version against a fixed list.
Browse files Browse the repository at this point in the history
This change is thanks to Peter Hull, who independently resolved
the 2.8 vs 2.8svn issue this way. His patch checked the version
string against a fixed set of options, which is easier to read
and simpler to adjust in the future.
(cherry picked from commit 83cc297)
  • Loading branch information
rillian authored and graydon committed Oct 21, 2010
1 parent c3879c1 commit 6b9a9a7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,13 @@ endif
ifneq ($(CFG_LLVM_CONFIG),)
CFG_LLVM_VERSION := $(shell $(CFG_LLVM_CONFIG) --version)
$(info cfg: found llvm-config at $(CFG_LLVM_CONFIG))
ifneq ($(findstring 2.8,$(CFG_LLVM_VERSION)),)
$(info cfg: using LLVM version $(CFG_LLVM_VERSION))
else ifneq ($(findstring 2.9,$(CFG_LLVM_VERSION)),)
CFG_LLVM_ALLOWED_VERSIONS := 2.8svn 2.8 2.9svn
ifneq ($(findstring $(CFG_LLVM_VERSION),$(CFG_LLVM_ALLOWED_VERSIONS)),)
$(info cfg: using LLVM version $(CFG_LLVM_VERSION))
else
CFG_LLVM_CONFIG :=
$(info cfg: incompatible LLVM version $(CFG_LLVM_VERSION), \
expected 2.8)
expected one of $(CFG_LLVM_ALLOWED_VERSIONS)
endif
endif
ifneq ($(CFG_LLVM_CONFIG),)
Expand Down

0 comments on commit 6b9a9a7

Please sign in to comment.