Address Sanitizer


I had build llvm-3.9 (having clang-3.9 and compiler-rt-3.9). I want to run asan on both 32 bit architecture as well as 64 bit architecture.

Compiling it with -m32 I am getting following error:

/usr/bin/ld: cannot find ~/llvm/build/bin/…/lib/clang/3.9.0/lib/linux/libclang_rt.asan-i386.a: No such file or directory
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)

Could somebody please help me to resolve this issue!

Hi Aayushi,

Seems the link [1] answers your question.




This link didn't work for me.

As I am getting error whose meaning is - there are no options as -arch i386 -arch x86_64. How should I remove this error?

Looks like you haven't built the i386 versions of the libraries.
Can you please paste the commands you're using to build LLVM?

So can you please post the commands you used to configure and build LLVM?
I actually don't think "-m32 -m64" can work together.