[PATCH] D42390: msan: Pass --disable-new-dtags for tests

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 13:18:19 PST 2018


hintonda added a comment.

In https://reviews.llvm.org/D42390#986961, @Hahnfeld wrote:

> In https://reviews.llvm.org/D42390#986105, @hintonda wrote:
>
> > In https://reviews.llvm.org/D42390#986091, @Hahnfeld wrote:
> >
> > > In https://reviews.llvm.org/D42390#985837, @eugenis wrote:
> > >
> > > > One option is to unset LD_LIBRARY_PATH in tests.
> > > >  Another is to use -Wl,-rpath when linking the code with non-instrumented libc++. The same as tests do for instrumented one.
> > >
> > >
> > > I use libc++ with the host compiler and it needs to be in LD_LIBRARY_PATH for all other tests to work.
> >
> >
> > You should be able to handle this in lit.
> >
> > Take a look at how compiler-rt/test/asan/lit.cfg munges LD_LIBRARY_PATH, and do something similar in compiler-rt/test/msan/Unit/.
>
>
> I was half-way through implementing this and wanted to align `tsan` where we might have the same problem (for some reasons unknown to me the tests don't fail there?). However, setting environment variables like `LD_LIBRARY_PATH` in lit means that also the compiler will run in this environment:
>
>   symbol lookup error: <...>/projects/compiler-rt/lib/tsan/libcxx_tsan_x86_64/lib/libc++.so.1: undefined symbol: __tsan_init
>
>
> This obviously works for tsan-binaries but not if some toolchain binaries are linked against `libc++`.


I normally build on my mac, and haven't actually seen these errors.  Can you tell me how to reproduce?  Should I build/test on Linux?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D42390





More information about the llvm-commits mailing list