From 0241b53c72e4ef39962007be1df8e09702c0c751 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 14 Jan 2015 00:39:56 +0000 Subject: [PATCH] Don't set LD_PRELOAD to ''. It doesn't work on OpenBSD. Patch by Brad Smith. llvm-svn: 225890 --- utils/lit/lit/TestingConfig.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/lit/lit/TestingConfig.py b/utils/lit/lit/TestingConfig.py index 52cebbf6a41..c7ef94dc11f 100644 --- a/utils/lit/lit/TestingConfig.py +++ b/utils/lit/lit/TestingConfig.py @@ -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({