Pass appropriate -L and -Wl,-rpath flags pointing out to the LLVM
library directory on NetBSD. This is necessary since clang on NetBSD
requires libc++ but it is not installed as part of the system
by default. For the purpose of running buildbot, we want LLDB to use
just-built libc++.
Details
- Reviewers
krytarowski labath zturner EricWF serge-sans-paille - Commits
- rLLDB355502: [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD
rGa2cc148f9fee: [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD
rL355502: [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD
Diff Detail
- Repository
- rL LLVM
Event Timeline
Unfortunately I don't know of a substantially better way to solve. I have one small improvement inline. Also, I take it this means running tests without a libc++ checkout is not supported on NetBSD. Maybe you should add netbsd to the cmake code where we print the darwin warning if you build without libc++ checked out.
lldb/lit/Suite/lit.cfg | ||
---|---|---|
35–36 ↗ | (On Diff #188195) | Instead of passing this via the environment, you should arrange so that --env LLVM_LIBS_DIR=dir gets passed to dotest.py. This will stop people from pounding the head against the wall on why do the tests behave differently when run from lit vs. directly from command line. |
Actually, it can use either libc++ checkout or installed libc++. it just happens that the latter is uncommon.
Turns out LD_LIBRARY_PATH does not solve all the issues on NetBSD. I've went ahead with the simplest solution possible, and added -Wl,-rpath (only on NetBSD) along with -L flags.