This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by mgorny on Feb 19 2017, 5:37 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Feb 19 2017, 5:37 AM

Another ping. @beanz, any chance you could take a look at this?

beanz accepted this revision.Aug 3 2017, 11:17 AM

Looks reasonable to me.

This revision is now accepted and ready to land.Aug 3 2017, 11:17 AM
This revision was automatically updated to reflect the committed changes.