[lit] Fix the way we check if an environment var is set

The old method would throw a KeyError.

llvm-svn: 370138
This commit is contained in:
Jonas Devlieghere 2019-08-28 00:52:08 +00:00
parent de37c444ef
commit eb0df9b285
1 changed files with 1 additions and 1 deletions

View File

@ -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():