1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

Fix Builder::execute() to more properly pass the desired environment

to tools.

llvm-svn: 126263
This commit is contained in:
David Greene 2011-02-22 23:30:45 +00:00
parent 505c6fac89
commit f37b51af6b

View File

@ -318,8 +318,10 @@ class Builder(threading.Thread):
if not os.path.exists(execdir):
os.makedirs(execdir)
execenv = os.environ.copy()
for key, value in env.items():
os.environ[key] = value
execenv[key] = value
self.logger.debug("[" + prefix + "] " + "env " + str(env) + " "
+ " ".join(command));
@ -327,6 +329,7 @@ class Builder(threading.Thread):
try:
proc = subprocess.Popen(command,
cwd=execdir,
env=execenv,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
@ -339,9 +342,6 @@ class Builder(threading.Thread):
except:
traceback.print_exc()
for key, value in env.items():
os.environ.pop(key)
# Get a list of C++ include directories to pass to clang.
def get_includes(self):
# Assume we're building with g++ for now.