Merging r309979:

------------------------------------------------------------------------
r309979 | mgorny | 2017-08-03 12:41:33 -0700 (Thu, 03 Aug 2017) | 16 lines

[test] Fix clang library dir in LD_LIBRARY_PATH For stand-alone build

Prepend the clang library directory (determined using SHLIBDIR, alike
in clang) to the LD_LIBRARY_PATH to ensure that just-built clang
libraries will be used instead of a previous installed version.

When a stand-alone build is performed, LLVM_LIBS_DIR contains the path
to installed LLVM library directory. The same directory frequently
contains a previously installed version of clang. SHLIBDIR, on the other
hand, is always the build-tree directory, and therefore contains
the freshly built clang libraries.

In a non-stand-alone build, both paths will be the same and therefore
including them both will not cause any issues.

Differential Revision: https://reviews.llvm.org/D30155
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_50@315224 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed