aboutsummaryrefslogtreecommitdiff
path: root/src/CmakeModule.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-21 18:53:48 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-21 18:53:48 +0200
commit396598030927a8e531bd68ba3b382f86645af6c6 (patch)
tree7f4677b955f3e259b71701bf142fc76648fa9476 /src/CmakeModule.cpp
parent8a923ca5fd87e8e63bda337bb2e393fa3acda209 (diff)
Add thread sanitizer option (--sanitize=thread)
Diffstat (limited to 'src/CmakeModule.cpp')
-rw-r--r--src/CmakeModule.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp
index f57a8cf..5bf9400 100644
--- a/src/CmakeModule.cpp
+++ b/src/CmakeModule.cpp
@@ -80,7 +80,7 @@ namespace sibs
case Sanitize::NONE:
break;
case Sanitize::ADDRESS:
- allLinkerFlags += " -lasan";
+ allLinkerFlags += TINYDIR_STRING(" -lasan");
break;
case Sanitize::UNDEFINED:
allLinkerFlags += TINYDIR_STRING(" -lubsan");
@@ -88,6 +88,9 @@ namespace sibs
case Sanitize::LEAK:
allLinkerFlags += TINYDIR_STRING(" -llsan");
break;
+ case Sanitize::THREAD:
+ allLinkerFlags += TINYDIR_STRING(" -ltsan");
+ break;
}
}
@@ -212,6 +215,9 @@ namespace sibs
case Sanitize::LEAK:
cflags += TINYDIR_STRING(" -fsanitize=leak");
break;
+ case Sanitize::THREAD:
+ cflags += TINYDIR_STRING(" -fsanitize=thread");
+ break;
}
}