diff options
Diffstat (limited to 'test/ubsan/lit.common.cfg')
-rw-r--r-- | test/ubsan/lit.common.cfg | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/test/ubsan/lit.common.cfg b/test/ubsan/lit.common.cfg index d28733a61cf8..7ae078a8625c 100644 --- a/test/ubsan/lit.common.cfg +++ b/test/ubsan/lit.common.cfg @@ -17,18 +17,22 @@ config.test_source_root = os.path.dirname(__file__) # Choose between standalone and UBSan+ASan modes. ubsan_lit_test_mode = get_required_attr(config, 'ubsan_lit_test_mode') if ubsan_lit_test_mode == "Standalone": - config.name = 'UndefinedBehaviorSanitizer-Standalone' + config.name = 'UBSan-Standalone-' + config.target_arch config.available_features.add("ubsan-standalone") clang_ubsan_cflags = [] elif ubsan_lit_test_mode == "AddressSanitizer": - if config.host_os == 'Darwin': - # ubsan-asan doesn't yet work on Darwin, - # see http://llvm.org/bugs/show_bug.cgi?id=21112. - config.unsupported = True - config.name = 'UndefinedBehaviorSanitizer-AddressSanitizer' + config.name = 'UBSan-ASan-' + config.target_arch config.available_features.add("ubsan-asan") clang_ubsan_cflags = ["-fsanitize=address"] config.environment['ASAN_OPTIONS'] = 'detect_leaks=0' +elif ubsan_lit_test_mode == "MemorySanitizer": + config.name = 'UBSan-MSan-' + config.target_arch + config.available_features.add("ubsan-msan") + clang_ubsan_cflags = ["-fsanitize=memory"] +elif ubsan_lit_test_mode == "ThreadSanitizer": + config.name = 'UBSan-TSan-' + config.target_arch + config.available_features.add("ubsan-tsan") + clang_ubsan_cflags = ["-fsanitize=thread"] else: lit_config.fatal("Unknown UBSan test mode: %r" % ubsan_lit_test_mode) @@ -47,9 +51,14 @@ config.substitutions.append( ("%clangxx ", build_invocation(clang_ubsan_cxxflags config.suffixes = ['.c', '.cc', '.cpp'] # Check that the host supports UndefinedBehaviorSanitizer tests -if config.host_os not in ['Linux', 'Darwin', 'FreeBSD']: +if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'Windows']: config.unsupported = True +if config.host_os == 'Windows': + # We do not currently support enough of the Microsoft ABI for UBSan to work on + # Windows. + config.available_features.remove('cxxabi') + # Allow tests to use REQUIRES=stable-runtime. For use when you cannot use XFAIL # because the test hangs or fails on one configuration and not the other. if config.target_arch.startswith('arm') == False: |