Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 1 | import lit.formats |
| 2 | import os |
Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 3 | |
| 4 | config.name = 'cfi' |
| 5 | config.suffixes = ['.cpp'] |
| 6 | config.test_source_root = os.path.dirname(__file__) |
| 7 | |
Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 8 | clangxx = ' '.join([config.clang] + config.cxx_mode_flags) |
| 9 | |
| 10 | config.substitutions.append((r"%clangxx ", clangxx + ' ')) |
Pirama Arumuga Nainar | cdce50b | 2015-07-01 12:26:56 -0700 | [diff] [blame] | 11 | if config.lto_supported: |
| 12 | config.substitutions.append((r"%clangxx_cfi ", ' '.join(config.lto_launch + [clangxx] + config.lto_flags + ['-fsanitize=cfi ']))) |
Stephen Hines | 86277eb | 2015-03-23 12:06:32 -0700 | [diff] [blame] | 13 | else: |
| 14 | config.unsupported = True |
| 15 | |
| 16 | if lit_config.params.get('check_supported', None) and config.unsupported: |
| 17 | raise BaseException("Tests unsupported") |