summaryrefslogtreecommitdiffstats
path: root/lldb/lit/Suite/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/lit/Suite/lit.cfg')
-rw-r--r--lldb/lit/Suite/lit.cfg22
1 files changed, 10 insertions, 12 deletions
diff --git a/lldb/lit/Suite/lit.cfg b/lldb/lit/Suite/lit.cfg
index 0c270f5e690..24dc8682f39 100644
--- a/lldb/lit/Suite/lit.cfg
+++ b/lldb/lit/Suite/lit.cfg
@@ -20,18 +20,16 @@ config.test_source_root = os.path.join(config.lldb_src_root, 'packages',
'Python', 'lldbsuite', 'test')
config.test_exec_root = config.test_source_root
-# macOS flags needed for LLDB built with address sanitizer.
-if 'Address' in config.llvm_use_sanitizer and \
- 'Darwin' in config.host_os and \
- 'x86' in config.host_triple:
- import subprocess
- resource_dir = subprocess.check_output(
- config.cmake_cxx_compiler +' -print-resource-dir', shell=True).strip()
- runtime = os.path.join(resource_dir, 'lib', 'darwin',
- 'libclang_rt.asan_osx_dynamic.dylib')
- config.environment['ASAN_OPTIONS'] = \
- 'detect_stack_use_after_return=1'
- config.environment['DYLD_INSERT_LIBRARIES'] = runtime
+if 'Address' in config.llvm_use_sanitizer:
+ config.environment['ASAN_OPTIONS'] = 'detect_stack_use_after_return=1'
+ # macOS flags needed for LLDB built with address sanitizer.
+ if 'Darwin' in config.host_os and 'x86' in config.host_triple:
+ import subprocess
+ resource_dir = subprocess.check_output(
+ [config.cmake_cxx_compiler, '-print-resource-dir']).strip()
+ runtime = os.path.join(resource_dir, 'lib', 'darwin',
+ 'libclang_rt.asan_osx_dynamic.dylib')
+ config.environment['DYLD_INSERT_LIBRARIES'] = runtime
# Shared library build of LLVM may require LD_LIBRARY_PATH or equivalent.
def find_shlibpath_var():
OpenPOWER on IntegriCloud