Pass the correct library directory from CMake to dotest.py when linking
liblldb, instead of trying to reconstruct the path from executable path.
This fixes link failures on platforms having non-null
LLVM_LIBDIR_SUFFIX.
Details
Diff Detail
Event Timeline
If we go down this path, then I think we should just pass the full path to the lib directory, and remove all the code which tries to autodetect it.
But if you're looking for a quick fix, I think adding "netbsd" to the list of operating systems at dotest.py:625 should fix this problem.
I think it /may/ break one. See inline comment.
BTW, I think the best way to clean a lot of this up would be to take the tests which build executables linking to liblldb, and rewrite them as c++ unit tests (at least those that aren't skipped/xfailed everywhere), as cmake knows best how to link to the thing it has built. Then, a lot of this stuff can be just deleted...
lldb/packages/Python/lldbsuite/test/lldbtest.py | ||
---|---|---|
1680 | I'm not sure if this is right, because (despite the name) LLDB_LIB_DIR points to the "bin" dir. But then again, this whole function seems pretty wrong, so it's hard to say what should it really do here. If you don't need this part (the previous patch didn't have it) and want to make this safe-ish for cherry-picking, maybe you could leave this part out for now. |
lldb/packages/Python/lldbsuite/test/lldbtest.py | ||
---|---|---|
1680 | Ok, I'll do a second run and see if the result changes without it. |
I'm not sure if this is right, because (despite the name) LLDB_LIB_DIR points to the "bin" dir. But then again, this whole function seems pretty wrong, so it's hard to say what should it really do here.
If you don't need this part (the previous patch didn't have it) and want to make this safe-ish for cherry-picking, maybe you could leave this part out for now.