Many sanitizers's rt libraries include code from sanitizer_common. For example: leak sanitizer, ub sanitizer, asan sanitizer, etc.
This can generate link errors when combining many sanitizers that are implemented as static libraries, because the code of sanitizer_common is included many times resulting in multiple definitions.
Now, this link error is avoided by including many sanitizers (leak, ub, etc) in asan's rt library.
In this diff I define a common static library including main code from sanitizer_common: "clang-rt.san_common.a", and remove that code from all sanitizer's static libraries, like: "clang-rt_asan.a", clang-rt_lsan.a", etc. Also, I modify clang driver to include "clang-rt.san_common.a" when necessary (in a different diff, because that changes go in clang repository).
I think this is a better approach since it will enable to combine many different sanitizers with no link errors, and without including all of them in the same library.
This one doesn't have RTSanitizerCommon & RTSanitizerCommonLibc. Is this intended?