minix/sys/external/bsd/compiler_rt/dist/lib/lsan/lit_tests/LsanConfig/lit.cfg
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00

26 lines
970 B
Python

# -*- Python -*-
import os
def get_required_attr(config, attr_name):
attr_value = getattr(config, attr_name, None)
if not attr_value:
lit.fatal("No attribute %r in test configuration! You may need to run "
"tests from your build directory or add this attribute "
"to lit.site.cfg " % attr_name)
return attr_value
lsan_lit_src_root = get_required_attr(config, "lsan_lit_src_root")
lsan_lit_cfg = os.path.join(lsan_lit_src_root, "lit.common.cfg")
if not os.path.exists(lsan_lit_cfg):
lit.fatal("Can't find common LSan lit config at: %r" % lsan_lit_cfg)
lit.load_config(config, lsan_lit_cfg)
config.name = 'LeakSanitizer-Standalone'
clang_lsan_cxxflags = config.clang_cxxflags + " -fsanitize=leak "
config.substitutions.append( ("%clangxx_lsan ", (" " + config.clang + " " +
clang_lsan_cxxflags + " ")) )
config.environment['LSAN_SYMBOLIZER_PATH'] = config.llvm_symbolizer_path