https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65639

--- Comment #2 from Sergey Matveev <earthdok at google dot com> ---
This is also discussed in the email thread following the clang commit:
https://www.mail-archive.com/cfe-commits@cs.uiuc.edu/msg106622.html

You could say that by passing -fsanitize=address at link time, we explicitly
tell clang to link in the sanitizer runtime. So -nodefaultlibs shouldn't negate
-fsanitize=address much as it wouldn't negate -lc. I think this was the logic
behind the final decision.

While -l:libasan.a helps, it must be applied to non-shared objects only, which
is more awkward than just adding -fsanitize=address.

Reply via email to