Home | History | Annotate | Download | only in Unit
      1 ## Autogenerated by LLVM/Clang configuration.
      2 # Do not edit!
      3 
      4 import os
      5 
      6 # Load common config for all compiler-rt unit tests.
      7 lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
      8 
      9 def push_ld_library_path(config, new_path):
     10   new_ld_library_path = os.path.pathsep.join(
     11     (new_path, config.environment['LD_LIBRARY_PATH']))
     12   config.environment['LD_LIBRARY_PATH'] = new_ld_library_path
     13 
     14 # Setup config name.
     15 config.name = 'AddressSanitizer-Unit'
     16 
     17 # Setup test source and exec root. For unit tests, we define
     18 # it as build directory with ASan unit tests.
     19 # FIXME: De-hardcode this path.
     20 config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/asan/tests"
     21 config.test_source_root = config.test_exec_root
     22 
     23 # Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
     24 push_ld_library_path(config, config.compiler_rt_libdir)
     25 
     26 # Enable leak detection in ASan unit tests on x86_64-linux.
     27 if config.host_os == 'Linux' and config.host_arch == 'x86_64':
     28   config.environment['ASAN_OPTIONS'] = 'detect_leaks=1'
     29