summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-03-06 09:18:15 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-03-06 09:34:31 +0000
commit19a633310feb3283d979c4ab4cb11a53dcfb6af6 (patch)
tree9611f20b14cfda66281fff940d2af56bbacfb34f
parentccf57af93f7118a044fa21e874847fa3ed555bca (diff)
scons: Fix version comparisons.
-rw-r--r--scons/llvm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scons/llvm.py b/scons/llvm.py
index 88a63854bc..01eae2403a 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -76,6 +76,7 @@ def generate(env):
mo = llvm_version_re.match(line)
if mo:
llvm_version = mo.group(1)
+ llvm_version = distutils.version.LooseVersion(llvm_version)
break
if llvm_version is None:
print 'scons: could not determine the LLVM version from %s' % llvm_config
@@ -130,6 +131,7 @@ def generate(env):
env.Append(LINKFLAGS = ['/nodefaultlib:LIBCMT'])
elif env.Detect('llvm-config'):
llvm_version = env.backtick('llvm-config --version').rstrip()
+ llvm_version = distutils.version.LooseVersion(llvm_version)
try:
env.ParseConfig('llvm-config --cppflags')
@@ -145,7 +147,6 @@ def generate(env):
assert llvm_version is not None
print 'scons: Found LLVM version %s' % llvm_version
- llvm_version = distutils.version.LooseVersion(llvm_version)
env['LLVM_VERSION'] = llvm_version
# Define HAVE_LLVM macro with the major/minor version number (e.g., 0x0206 for 2.6)