llvm-project/compiler-rt/test/gwp_asan/lit.cfg

32 lines
741 B
Python

# -*- Python -*-
import os
# Setup config name.
config.name = 'GWP-ASan' + config.name_suffix
# Setup source root.
config.test_source_root = os.path.dirname(__file__)
# Test suffixes.
config.suffixes = ['.c', '.cc', '.cpp', '.test']
# C & CXX flags.
c_flags = ([config.target_cflags])
# Android doesn't want -lrt.
if not config.android:
c_flags += ["-lrt"]
cxx_flags = (c_flags + config.cxx_mode_flags + ["-std=c++11"])
def build_invocation(compile_flags):
return " " + " ".join([config.clang] + compile_flags) + " "
# Add substitutions.
config.substitutions.append(("%clang ", build_invocation(c_flags)))
# GWP-ASan tests are currently supported on Linux only.
if config.host_os not in ['Linux']:
config.unsupported = True