aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/lit.cfg3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 5e7e0e4449..4eaa507ec4 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -46,7 +46,8 @@ if llvm_obj_root is not None:
config.environment['PATH'] = path
# Propogate 'HOME' through the environment.
-config.environment['HOME'] = os.environ['HOME']
+if 'HOME' in os.environ:
+ config.environment['HOME'] = os.environ['HOME']
# Propogate LLVM_SRC_ROOT into the environment.
config.environment['LLVM_SRC_ROOT'] = getattr(config, 'llvm_src_root', '')