[llvm-commits] [llvm] r126263 - /llvm/trunk/utils/llvmbuild
David Greene
greened at obbligato.org
Tue Feb 22 15:30:45 PST 2011
Author: greened
Date: Tue Feb 22 17:30:45 2011
New Revision: 126263
URL: http://llvm.org/viewvc/llvm-project?rev=126263&view=rev
Log:
Fix Builder::execute() to more properly pass the desired environment
to tools.
Modified:
llvm/trunk/utils/llvmbuild
Modified: llvm/trunk/utils/llvmbuild
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvmbuild?rev=126263&r1=126262&r2=126263&view=diff
==============================================================================
--- llvm/trunk/utils/llvmbuild (original)
+++ llvm/trunk/utils/llvmbuild Tue Feb 22 17:30:45 2011
@@ -318,8 +318,10 @@
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 @@
try:
proc = subprocess.Popen(command,
cwd=execdir,
+ env=execenv,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
@@ -339,9 +342,6 @@
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.
More information about the llvm-commits
mailing list