I am using thread sanitizer to debug my code, and the comment in this answer mentioned to avoid false positive brought by newer C++ features such as std::thread
and std::future
, I should compile the libstdc++ with -fsanitize=thread flag.
I have downloaded the source code of gcc 10 and have completed the default compilation. But what is the recommend way to add -fsanitize=thread to the libstdc++?