From eb0df9b285c90dc7f22366c775dd69b490ec840f Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 28 Aug 2019 00:52:08 +0000 Subject: [PATCH] [lit] Fix the way we check if an environment var is set The old method would throw a KeyError. llvm-svn: 370138 --- lldb/lit/Suite/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/lit/Suite/lit.cfg b/lldb/lit/Suite/lit.cfg index a0d4dc4ff31f..80117eb67080 100644 --- a/lldb/lit/Suite/lit.cfg +++ b/lldb/lit/Suite/lit.cfg @@ -39,7 +39,7 @@ def find_shlibpath_var(): elif platform.system() == 'Windows': yield 'PATH' -if not config.environment['DYLD_INSERT_LIBRARIES']: +if 'DYLD_INSERT_LIBRARIES' in os.environ: # Shared library build of LLVM may require LD_LIBRARY_PATH or equivalent. # This clashes with DYLD_INSERT_LIBRARIES which is needed on Darwin. for shlibpath_var in find_shlibpath_var():