[Libclc-dev] [PATCH] Unbreak LLVM 3.5 build

Jeroen Ketema j.ketema at imperial.ac.uk
Fri Mar 7 02:31:19 PST 2014


LLVM 3.5 now needs c++11
---
configure.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.py b/configure.py
index 768a6ad..b876f3a 100755
--- a/configure.py
+++ b/configure.py
@@ -65,13 +65,17 @@ def llvm_config(args):

llvm_version = string.split(string.replace(llvm_config(['--version']), 'svn', ''), '.')
llvm_system_libs = ''
+llvm_cxx11flags = ''
if (int(llvm_version[0]) == 3 and int(llvm_version[1]) >= 5) or int(llvm_version[0]) > 3:
    llvm_system_libs = llvm_config(['--system-libs'])
+    llvm_cxx11_flags = '-std=c++11'
+
llvm_bindir = llvm_config(['--bindir'])
llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader', 'bitwriter']) + ' ' + \
                 llvm_system_libs + ' ' + \
                 llvm_config(['--ldflags'])
-llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti'
+llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti ' + \
+                llvm_cxx11_flags

llvm_clang = os.path.join(llvm_bindir, 'clang')
llvm_link = os.path.join(llvm_bindir, 'llvm-link')
-- 
1.8.3.4 (Apple Git-47)





More information about the Libclc-dev mailing list