From 995625b761b8d0f9d27d685af77cad1a7f093570 Mon Sep 17 00:00:00 2001
From: Andrea Shepard <andrea@persephoneslair.org>
Date: Wed, 9 Nov 2016 22:30:45 +0000
Subject: [PATCH] LLVM hates backwards compatibility so they don't get any

---
 .travis.yml    | 1 +
 src/SConscript | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index b533da31..9dd1b9e0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -92,6 +92,7 @@ matrix:
       env: BINDINGS=cpp CC=clang
 before_install:
   - sudo apt-get update -qq
+  - sudo apt-get install llvm-3.8
   - sudo apt-get install lcov
   - gem install coveralls-lcov
   - if [ "$BINDINGS" != "none" ]; then sudo apt-get install -qq swig; fi
diff --git a/src/SConscript b/src/SConscript
index cea45efa..aef5faca 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -110,6 +110,11 @@ testenv.ParseConfig('pkg-config --cflags --libs glib-2.0')
 testenv_llvm_config_version = subprocess.Popen('%s --version' % env["LLVM_CONFIG"], \
                                                shell=True, \
                                                stdin=subprocess.PIPE, stdout=subprocess.PIPE).communicate()
+
+if LooseVersion(testenv_llvm_config_version[0]) < LooseVersion("3.6"):
+   print "This LLVM version %s is too old" % testenv_llvm_config_version
+   Exit(1)
+
 if LooseVersion(testenv_llvm_config_version[0]) < LooseVersion("3.9") and \
    LooseVersion(testenv_llvm_config_version[0]) >= LooseVersion("3.5"):
     testenv_llvm_system_libs_flag = "--system-libs"
-- 
GitLab