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

Don Hinton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 02:09:14 PST 2018


hintonda added a comment.

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

> In https://reviews.llvm.org/D42390#987510, @hintonda wrote:
>
> > Pretty sure /usr/lib gets searched last, i.e., DT_RUNPATH always wins unless LD_LIBRARY_PATH is set.
>
>
> That's right, unless it's also in LD_LIBRARY_PATH


But that's my point.  You should avoid setting LD_LIBRARY_PATH unless you have no other choice.

> 
> 
>> As a general rule, only set LD_LIBRARY_PATH as a last resort, and if you have a special case, use a wrapper script.
> 
> You are the first person to say that and in general the tests shouldn't fail just because someone needed to use the "last resort".

Well, perhaps the second, i.e., s/evil/last resort/:

> In https://reviews.llvm.org/D42390#987043, @eugenis wrote:
>  Right. That's why LD_LIBRARY_PATH is evil, as are environment variables in general.
>  IMHO the right way is to set DT_RUNPATH for each executable that wants non-standard libraries. That includes your host compiler.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D42390





More information about the llvm-commits mailing list