On Thu, Jan 27, 2022 at 6:21 PM Dmitry Work <[email protected]> wrote: > > What is the right way of using a custom (built by me from llvm sources) asan > library? > > During compilation I am using -fsanitize=address. > > But what should I use for linking? It is recommended everywhere to use > -static-libasan or -shared-libasan, but as far as I understand, linker will > use the library that comes with compiler (not mine). > > Shall I drop -static-libasan / -shared-libasan and just link against the > clang_rt.asan-dynamic-x86_64 built by me? Or something else?
According to the compiler folks, you should drive link through the compiler driver. The compiler driver will add the proper libraries for you. Do not invoke LD yourself. It is getting too hard to get right, especially when you have a compiler located at a non-standard location like /opt or /opt/local. Jeff -- You received this message because you are subscribed to the Google Groups "address-sanitizer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/address-sanitizer/CAH8yC8k7rHTAw%3Dimbd2xhOaZ4AJkZ6QUz%3Ds%3DBOGNq%2BhFxU5htw%40mail.gmail.com.
