summaryrefslogtreecommitdiff
path: root/test/asan/Unit/lit.site.cfg.in
blob: 46eea1ff9a68f1deccd33c64c23bffd56323bedd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Autogenerated by LLVM/Clang configuration.
# Do not edit!

import os

# Load common config for all compiler-rt unit tests.
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")

def push_ld_library_path(config, new_path):
  new_ld_library_path = os.path.pathsep.join(
    (new_path, config.environment['LD_LIBRARY_PATH']))
  config.environment['LD_LIBRARY_PATH'] = new_ld_library_path

# Setup config name.
config.name = 'AddressSanitizer-Unit'

# Setup test source and exec root. For unit tests, we define
# it as build directory with ASan unit tests.
# FIXME: De-hardcode this path.
config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/asan/tests"
config.test_source_root = config.test_exec_root

# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
push_ld_library_path(config, config.compiler_rt_libdir)

# Enable leak detection in ASan unit tests on x86_64-linux.
if config.host_os == 'Linux' and config.host_arch == 'x86_64':
  config.environment['ASAN_OPTIONS'] = 'detect_leaks=1'