From 396598030927a8e531bd68ba3b382f86645af6c6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 21 Oct 2020 18:53:48 +0200 Subject: Add thread sanitizer option (--sanitize=thread) --- backend/ninja/Ninja.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend') diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 980ef2c..8b815cb 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -412,6 +412,8 @@ namespace backend return ninja::NinjaArg::createRaw("-fsanitize=undefined"); case Sanitize::LEAK: return ninja::NinjaArg::createRaw("-fsanitize=leak"); + case Sanitize::THREAD: + return ninja::NinjaArg::createRaw("-fsanitize=thread"); } } return {}; @@ -427,6 +429,8 @@ namespace backend return ninja::NinjaArg::createRaw("-lubsan"); case Sanitize::LEAK: return ninja::NinjaArg::createRaw("-llsan"); + case Sanitize::THREAD: + return ninja::NinjaArg::createRaw("-ltsan"); } return {}; } -- cgit v1.2.3