Compiling program with dfsan at IR

Hi,

I am trying to instrument a small program with dfsan at IR and then compile it. But I end up with undefined reference errors.

Steps taken:
1.Convert toy program to .bc
2. IR pass to insert dfsan calls
3.opt -dfsan on resultant bitcode from step 2
4. llc step3.bc -o step4.s
5. gcc step.s -o step5.o

I get error "undefined reference to `__dfsan_arg_tls’ " and so forth for all functions defined.
Is there something I am missing or doing wrong in my steps.

Programs compiled with dfsan require a runtime library in order to work correctly. You will need to link your program with “clang -fsanitize=dataflow”.

Peter