diff options
| author | Ralph Giles <[email protected]> | 2010-10-20 15:59:01 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-10-21 16:06:39 -0700 |
| commit | 6b9a9a787435f934c6d616f9720dabce24416a76 (patch) | |
| tree | 9abf1302b225208085fee51137c52b10715f380b /src | |
| parent | Also search the bare ocaml standard library path for llvm bindings. (diff) | |
| download | rust-6b9a9a787435f934c6d616f9720dabce24416a76.tar.xz rust-6b9a9a787435f934c6d616f9720dabce24416a76.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 7 |
1 files changed, 3 insertions, 4 deletions
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),) |