This is an archive of the discontinued LLVM Phabricator instance.

[test] Correctly include build llvm_shlib_dir in stand-alone builds
ClosedPublic

Authored by mgorny on Oct 29 2016, 5:18 AM.

Details

Summary

Add the build llvm_shlib_dir into LD_LIBRARY_PATH before the directory
specified as llvm_libs_dir, in order to fix stand-alone builds
attempting to use installed clang libraries.

In case of stand-alone builds llvm_libs_dir specifies the location of
installed LLVM libraries which can also contain an older version
(previous build) of clang libraries. Therefore, ensure to specify
llvm_shlib_dir (which is always the build tree path) before
the potentially-system llvm_libs_dir.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny updated this revision to Diff 76296.Oct 29 2016, 5:18 AM
mgorny retitled this revision from to [test] Correctly include build llvm_shlib_dir in stand-alone builds.
mgorny updated this object.
mgorny added reviewers: ddunbar, beanz.
mgorny added a subscriber: cfe-commits.
beanz added inline comments.Nov 14 2016, 1:53 PM
test/lit.cfg
109 ↗(On Diff #76296)

Should this really be fatal? It seems to me in many cases you might not need this to be set.

mgorny added inline comments.Nov 14 2016, 2:01 PM
test/lit.cfg
109 ↗(On Diff #76296)

I don't mind either way. I left it like this since I really don't see a case when it could be unset ;-).

beanz accepted this revision.Nov 14 2016, 3:16 PM
beanz edited edge metadata.

LGTM!

test/lit.cfg
109 ↗(On Diff #76296)

Ah! You're right. I didn't see where it was getting set.

This revision is now accepted and ready to land.Nov 14 2016, 3:16 PM
This revision was automatically updated to reflect the committed changes.