I am trying to do what has been done for tsan. So, there is a run time library “tsan" to detect races. There is a llvm pass to instrument read and write in c program and call functions in run time library. I have all three things with me, but I don’t know how should I link all these three together.
Basically I want to know how to implement same functionality as given below by adding flag -fsanitize.
"clang -fsanitize=thread -g -o1 tiny_race.c”
Any help would be much appreciated.