labath added a comment.

In D60180#1456263 <https://reviews.llvm.org/D60180#1456263>, @sgraenitz wrote:

> > No, everything is being built for android. Cross-compiling lldb-server 
> > involves cross-compiling llvm libraries, clang libraries, and if you've got 
> > swift in the picture, swift host libraries. LLVM and clang libraries are 
> > built against the libc++ from the android NDK, but in standalone builds, 
> > LLDB will try to link against the freshly built libc++ from LLVM. You get 
> > loads of undefined references to symbols from the NDK's libc++.
>
> For the `link_directories` line: if you cross-compile the entire tree and 
> this tree contains libc++, wouldn't it be natural that LLDB will try to link 
> against the freshly built libc++?
>  If this is not your intention, then maybe we need a `LLDB_EXTERNAL_LIBCXX` 
> option instead?


Well.. you definitely shouldn't link against the fresh libc++, but still use 
the headers from the system one (which I suspect is the cause of the undefined 
symbols Alex is seeing).

FWIW, I don't think cross-compilation should be a factor here. I can see 
somebody may want to build a fresh libc++ and then link llvm (all of it) 
against that, but that is true regardless of whether you're cross-compiling or 
not. However, I wouldn't expect this to be the default because then the built 
binaries wouldn't play well with anything else on this system, if the system 
happens to use a different C++ library (or just an incompatible version of 
libc++).


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60180/new/

https://reviews.llvm.org/D60180



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to