From 6b9a9a787435f934c6d616f9720dabce24416a76 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Wed, 20 Oct 2010 15:59:01 -0700 Subject: Check the llvm version against a fixed list. 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 83cc297561a78ad13fcd1c2943f17ace81c725b8) --- src/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Makefile b/src/Makefile index f7a1e116..9eb10539 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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),) -- cgit v1.2.3