Skip to content

Commit b38037f

Browse files
committedDec 29, 2013
Fix build with LLVM 3.5
Reviewed-by: Aaron Watry <awatry@gmail.com> llvm-svn: 198167
1 parent 0a062bd commit b38037f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎libclc/configure.py

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def c_compiler_rule(b, name, description, compiler, flags):
1010

1111
from optparse import OptionParser
1212
import os
13+
import string
1314
from subprocess import *
1415
import sys
1516

@@ -62,8 +63,13 @@ def llvm_config(args):
6263
print "Please ensure that llvm-config is in your $PATH, or use --with-llvm-config."
6364
sys.exit(1)
6465

66+
llvm_version = string.split(string.replace(llvm_config(['--version']), 'svn', ''), '.')
67+
llvm_system_libs = ''
68+
if (int(llvm_version[0]) == 3 and int(llvm_version[1]) >= 5) or int(llvm_version[0]) > 3:
69+
llvm_system_libs = llvm_config(['--system-libs'])
6570
llvm_bindir = llvm_config(['--bindir'])
6671
llvm_core_libs = llvm_config(['--libs', 'core', 'bitreader', 'bitwriter']) + ' ' + \
72+
llvm_system_libs + ' ' + \
6773
llvm_config(['--ldflags'])
6874
llvm_cxxflags = llvm_config(['--cxxflags']) + ' -fno-exceptions -fno-rtti'
6975

0 commit comments

Comments
 (0)
Please sign in to comment.