[RFC] Instrumented versions of libc++ for different sanitizers

Using filename infixes like libc++.asan.a is inflexible and difficult to support cases mixing two or more sanitizers (e.g. UBSan and another sanitizer). In addition, forcing CmdArgs.push_back("-lc++"); to change would cause a lot of unnecessary changes.

If there is really a push to make different versions of sanitizers, I’d like to see directories, e.g. -Lpath/to/lib/x86_64-unknown-linux-gnu/asan (the driver will append -Lpath/to/lib/x86_64-unknown-linux-gnu -lc++ after user -L). This doesn’t even need any driver change. Everything can be done in the build system.

For example, clang++ --print-file-name=libc++.so derives the path after libc++.so is built. Then you can derive the asan/libc++.so path and build a file there.

The fact that driver change may overlap with Clang’s experimental multilib support makes me nervous. [RFC] Multilib