mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Add the -fsanitize-blacklist option for the sanitizers. (#2261)
Blacklisting is necessary for some druntime functions, and LLVM/Clang already provides just the right functionality.
This commit is contained in:
parent
36088a1b49
commit
ec9ffe29f1
6 changed files with 104 additions and 1 deletions
|
@ -954,7 +954,8 @@ void DtoDefineFunction(FuncDeclaration *fd, bool linkageAvailableExternally) {
|
|||
if (gABI->needsUnwindTables()) {
|
||||
func->addFnAttr(LLAttribute::UWTable);
|
||||
}
|
||||
if (opts::isAnySanitizerEnabled()) {
|
||||
if (opts::isAnySanitizerEnabled() &&
|
||||
!opts::functionIsInSanitizerBlacklist(fd)) {
|
||||
// Set the required sanitizer attribute.
|
||||
if (opts::isSanitizerEnabled(opts::AddressSanitizer)) {
|
||||
func->addFnAttr(LLAttribute::SanitizeAddress);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue