This is another attempt to solve the issues mentioned in D42390: If there is
a libc++.so in LD_LIBRARY_PATH, it will be preferred over rpath set by lld
which uses DT_RUNPATH instead of DT_RPATH (called "new-dtags"). That causes
problems because the libc++ from LD_LIBRARY_PATH is not instrumented for use
with msan which breaks the unit tests.
There are two solutions:
- Pass --disable-new-dtags but that's not really great, especially going forward.
- Unset LD_LIBRARY_PATH when executing the tests. This needs to be done with some care to make sure that the compiled unit tests can indeed run without the need for any external library.