diff options
author | David Greene <greened@obbligato.org> | 2011-02-22 23:30:45 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-02-22 23:30:45 +0000 |
commit | 8b890c2f7da64085f785161559253b5ef06eff6f (patch) | |
tree | 40472821eaed8569a35d7f809dc5753aa782c8d4 /utils/llvmbuild | |
parent | 98d9648de7d571b2e6d139b65961a70d1833b0d7 (diff) | |
download | external_llvm-8b890c2f7da64085f785161559253b5ef06eff6f.zip external_llvm-8b890c2f7da64085f785161559253b5ef06eff6f.tar.gz external_llvm-8b890c2f7da64085f785161559253b5ef06eff6f.tar.bz2 |
Fix Builder::execute() to more properly pass the desired environment
to tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvmbuild')
-rwxr-xr-x | utils/llvmbuild | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/llvmbuild b/utils/llvmbuild index 56a429f..f20bb06 100755 --- a/utils/llvmbuild +++ b/utils/llvmbuild @@ -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. |