Mesa (master): scons: Don't use scons internal functions.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Sep 4 18:34:32 UTC 2009
Module: Mesa
Branch: master
Commit: b9f56078cd8b68e3f473d23232c1aa2f0f664a19
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9f56078cd8b68e3f473d23232c1aa2f0f664a19
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Sep 4 19:33:41 2009 +0100
scons: Don't use scons internal functions.
---
scons/llvm.py | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/scons/llvm.py b/scons/llvm.py
index 14306bc..53cf71c 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -29,9 +29,7 @@ Tool-specific initialization for LLVM
import os
import os.path
-import subprocess
-import SCons.Action
import SCons.Errors
import SCons.Util
@@ -58,17 +56,10 @@ def generate(env):
env.PrependENVPath('PATH', llvm_bin_dir)
if env.Detect('llvm-config'):
- pipe = SCons.Action._subproc(env,
- ['llvm-config', '--version'],
- stdin = 'devnull',
- stderr = 'devnull',
- stdout = subprocess.PIPE)
- if pipe.wait() != 0:
- return
- line = pipe.stdout.read().strip()
- if not line:
- return
- env['LLVM_VERSION'] = line
+ try:
+ env['LLVM_VERSION'] = env.backtick('llvm-config --version')
+ except NameError:
+ env['LLVM_VERSION'] = 'X.X'
env.ParseConfig('llvm-config --cppflags')
env.ParseConfig('llvm-config --libs jit interpreter nativecodegen bitwriter')
More information about the mesa-commit
mailing list