]> granicus.if.org Git - clang/commit
[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 17 Jun 2015 22:07:28 +0000 (22:07 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 17 Jun 2015 22:07:28 +0000 (22:07 +0000)
commitfb3d70bc0f72e2033c101c72a26efdb5930414c2
tree0ca42fac8e7bfe3810aaebd71d55d6beaa1213be
parentfa3804032d59c11a345ef7558d7938db43e86497
[Sanitizers] Provide better diagnostic for sanitizers unsupported for target triple.

Summary:
Introduce ToolChain::getSupportedSanitizers() that would return the set
of sanitizers available on given toolchain. By default, these are
sanitizers which don't necessarily require runtime support (i.e.
set from -fsanitize=undefined-trap).

Sanitizers (ASan, DFSan, TSan, MSan etc.) which cannot function
without runtime library are marked as supported only on platforms
for which we actually build these runtimes.

This would allow more fine-grained checks in the future: for instance,
we have to restrict availability of -fsanitize=vptr to Mac OS 10.9+
(PR23539)

Update test cases accrodingly: add tests for certain unsupported
configurations, remove test cases for -fsanitize=vptr + PS4
integration, as we don't build the runtime for PS4 at the moment.

Test Plan: regression test suite

Reviewers: pcc

Subscribers: cfe-commits, filcab, eugenis, thakis, kubabrecka, emaste, rsmith

Differential Revision: http://reviews.llvm.org/D10467

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239953 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Sanitizers.h
include/clang/Driver/ToolChain.h
lib/Basic/Sanitizers.cpp
lib/Driver/MSVCToolChain.cpp
lib/Driver/SanitizerArgs.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
test/Driver/asan.c
test/Driver/fsanitize.c
test/Driver/rtti-options.cpp