brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · c906c03 Raw
36 lines · plain
1# -*- Python -*-2 3import os4 5# Setup config name.6config.name = 'TypeSanitizer' + getattr(config, 'name_suffix', 'default')7 8# Setup source root.9config.test_source_root = os.path.dirname(__file__)10 11# Setup default compiler flags used with -fsanitize=type option.12clang_tysan_cflags = (["-fsanitize=type",13                      "-mno-omit-leaf-frame-pointer",14                      "-fno-omit-frame-pointer",15                      "-fno-optimize-sibling-calls"] +16                      config.target_cflags +17                      config.debug_info_flags)18clang_tysan_cxxflags = config.cxx_mode_flags + clang_tysan_cflags19 20def build_invocation(compile_flags):21  return " " + " ".join([config.clang] + compile_flags) + " "22 23config.substitutions.append( ("%clang_tysan ", build_invocation(clang_tysan_cflags)) )24config.substitutions.append( ("%clangxx_tysan ", build_invocation(clang_tysan_cxxflags)) )25 26# Default test suffixes.27config.suffixes = ['.c', '.cc', '.cpp']28 29# TypeSanitizer tests are currently supported on Linux only.30if config.target_os not in ['Linux']:31  config.unsupported = True32 33if config.target_arch != 'aarch64':34  config.available_features.add('stable-runtime')35 36