Skip to content

Commit

Permalink
Don't set LD_PRELOAD to ''. It doesn't work on OpenBSD.
Browse files Browse the repository at this point in the history
Patch by Brad Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225890 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
espindola committed Jan 14, 2015
1 parent c910922 commit 7c84568
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/lit/lit/TestingConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ def fromdefaults(litConfig):
'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({
Expand Down

0 comments on commit 7c84568

Please sign in to comment.