summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Tool/MSCommon/common.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2010-06-03 15:22:50 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2010-06-03 15:22:50 (GMT)
commit3fa801df526cd6507c285e1b9a26ba8b7422ae45 (patch)
treeae03b6a15ea8c10684e11626a7ab6bb43267a1e2 /src/engine/SCons/Tool/MSCommon/common.py
parent3ebd1cd7be97f4e763c552b053db193e95262dfd (diff)
downloadSCons-3fa801df526cd6507c285e1b9a26ba8b7422ae45.zip
SCons-3fa801df526cd6507c285e1b9a26ba8b7422ae45.tar.gz
SCons-3fa801df526cd6507c285e1b9a26ba8b7422ae45.tar.bz2
Initial Migration of MSVC logic from 1.3 branch.
Diffstat (limited to 'src/engine/SCons/Tool/MSCommon/common.py')
-rw-r--r--src/engine/SCons/Tool/MSCommon/common.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/common.py b/src/engine/SCons/Tool/MSCommon/common.py
index 2353172..596ea2d 100644
--- a/src/engine/SCons/Tool/MSCommon/common.py
+++ b/src/engine/SCons/Tool/MSCommon/common.py
@@ -120,18 +120,25 @@ def normalize_env(env, keys):
def get_output(vcbat, args = None, env = None):
"""Parse the output of given bat file, with given args."""
+
+ if env is None:
+ # Create a blank environment, for use in launching the tools
+ env= SCons.Environment.Environment(tools=[])
+
if args:
debug("Calling '%s %s'" % (vcbat, args))
- popen = subprocess.Popen('"%s" %s & set' % (vcbat, args),
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- env=env)
+ popen = SCons.Action._subproc(env,
+ '"%s" %s & set' % (vcbat, args),
+ stdin = 'devnull',
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
else:
debug("Calling '%s'" % vcbat)
- popen = subprocess.Popen('"%s" & set' % vcbat,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- env=env)
+ popen = SCons.Action._subproc(env,
+ '"%s" & set' % vcbat,
+ stdin = 'devnull',
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
# Use the .stdout and .stderr attributes directly because the
# .communicate() method uses the threading module on Windows