blob: 2343ff190ac8c7273747fa69f2b8558608b342ca [file] [log] [blame]
Stephen Hines86277eb2015-03-23 12:06:32 -07001import lit.formats
2import os
Stephen Hines86277eb2015-03-23 12:06:32 -07003
4config.name = 'cfi'
5config.suffixes = ['.cpp']
6config.test_source_root = os.path.dirname(__file__)
7
Stephen Hines86277eb2015-03-23 12:06:32 -07008clangxx = ' '.join([config.clang] + config.cxx_mode_flags)
9
10config.substitutions.append((r"%clangxx ", clangxx + ' '))
Pirama Arumuga Nainarcdce50b2015-07-01 12:26:56 -070011if config.lto_supported:
12 config.substitutions.append((r"%clangxx_cfi ", ' '.join(config.lto_launch + [clangxx] + config.lto_flags + ['-fsanitize=cfi '])))
Stephen Hines86277eb2015-03-23 12:06:32 -070013else:
14 config.unsupported = True
15
16if lit_config.params.get('check_supported', None) and config.unsupported:
17 raise BaseException("Tests unsupported")