Enable the SafeStack sanitizer on CloudABI by default.
authorEd Schouten <ed@nuxi.nl>
Tue, 29 Mar 2016 21:13:53 +0000 (21:13 +0000)
committerEd Schouten <ed@nuxi.nl>
Tue, 29 Mar 2016 21:13:53 +0000 (21:13 +0000)
commitfc79d2ca42be5e803091aaea8a90d3c347a5a5ce
treecfa503a38d93d40d468b6a3d60a41ec20874d669
parent4cfe93c599df862cb9c8f982374892ea05d65260
Enable the SafeStack sanitizer on CloudABI by default.

Over the last month we've been testing SafeStack extensively. As far as
we know, it works perfectly fine. That why I'd like to see us having
this enabled by default for CloudABI.

This change introduces a getDefaultSanitizers() function that toolchains
can use to specify which sanitizers are enabled by default. Once all
flags are processed, only flags that had no -fno-sanitize overrides are
enabled.

Extend the thests for CloudABI to test both the default case and the
case in which we want to explicitly disable SafeStack.

Reviewed by: eugenis, pcc
Differential Revision: http://reviews.llvm.org/D18505

llvm-svn: 264787
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/SanitizerArgs.cpp
clang/lib/Driver/ToolChains.cpp
clang/lib/Driver/ToolChains.h
clang/test/Driver/cloudabi.c
clang/test/Driver/cloudabi.cpp