diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2015-06-17 22:07:28 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-06-17 22:07:28 +0000 |
commit | 9170efdc0d6274b0d7438dcee929243fcca77e95 (patch) | |
tree | 1ad88f95c7dbe0a1391d845f4d6d3093ec761e96 /clang/lib/Driver/ToolChains.h | |
parent | e0d4037c6a0bcbdadf080e7a2ccd9846370d5f4c (diff) | |
download | bcm5719-llvm-9170efdc0d6274b0d7438dcee929243fcca77e95.tar.gz bcm5719-llvm-9170efdc0d6274b0d7438dcee929243fcca77e95.zip |
[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
llvm-svn: 239953
Diffstat (limited to 'clang/lib/Driver/ToolChains.h')
-rw-r--r-- | clang/lib/Driver/ToolChains.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h index 0b7073f2ba0..401aa839c21 100644 --- a/clang/lib/Driver/ToolChains.h +++ b/clang/lib/Driver/ToolChains.h @@ -474,6 +474,8 @@ public: void CheckObjCARC() const override; bool UseSjLjExceptions() const override; + + SanitizerMask getSupportedSanitizers() const override; }; /// DarwinClang - The Darwin toolchain used by Clang. @@ -616,6 +618,7 @@ public: bool UseSjLjExceptions() const override; bool isPIEDefault() const override; + SanitizerMask getSupportedSanitizers() const override; protected: Tool *buildAssembler() const override; Tool *buildLinker() const override; @@ -679,6 +682,7 @@ public: AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; bool isPIEDefault() const override; + SanitizerMask getSupportedSanitizers() const override; std::string Linker; std::vector<std::string> ExtraOpts; @@ -809,6 +813,7 @@ public: std::string ComputeEffectiveClangTriple(const llvm::opt::ArgList &Args, types::ID InputType) const override; + SanitizerMask getSupportedSanitizers() const override; protected: void AddSystemIncludeWithSubfolder(const llvm::opt::ArgList &DriverArgs, |