Don't set LD_PRELOAD to ''. It doesn't work on OpenBSD.

Patch by Brad Smith.

llvm-svn: 225890
This commit is contained in:
Rafael Espindola 2015-01-14 00:39:56 +00:00
parent 43d3f55072
commit bc301a8ed4
1 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,11 @@ class TestingConfig:
'LD_PRELOAD', 'ASAN_OPTIONS', 'UBSAN_OPTIONS',
'LSAN_OPTIONS']
for var in pass_vars:
environment[var] = os.environ.get(var, '')
val = os.environ.get(var, '')
# Check for empty string as some variables such as LD_PRELOAD cannot be empty
# ('') for OS's such as OpenBSD.
if val:
environment[var] = val
if sys.platform == 'win32':
environment.update({