| import lit.formats |
| import os |
| |
| config.name = 'cfi' |
| config.suffixes = ['.cpp'] |
| config.test_source_root = os.path.dirname(__file__) |
| |
| clangxx = ' '.join([config.clang] + config.cxx_mode_flags) |
| |
| config.substitutions.append((r"%clangxx ", clangxx + ' ')) |
| if config.lto_supported: |
| config.substitutions.append((r"%clangxx_cfi ", ' '.join(config.lto_launch + [clangxx] + config.lto_flags + ['-fsanitize=cfi ']))) |
| else: |
| config.unsupported = True |
| |
| if lit_config.params.get('check_supported', None) and config.unsupported: |
| raise BaseException("Tests unsupported") |