[lldb-dev] [CMake] cross compiling lldb-server

Pavel Labath via lldb-dev lldb-dev at lists.llvm.org
Mon Dec 31 00:15:30 PST 2018

On 30/12/2018 00:36, Joel Winarske via lldb-dev wrote:
> Hi,
> I'm looking at cross compiling lldb-server for a Linux target.  My use 
> case only needs lldb-server cross-compiled for the target.  I'm finding 
> it's expecting a cross-compiled clang.
> It would be great to have a build option to support cross-compiling only 
> lldb-server.
> The other scenario is an architecture specific lldb-server. Say I want 
> AArch64, and the only thing to run on the target is AArch64.  I would 
> never need support for mip64, etc.  This would also minimize the size.
> Maybe I'm missing something?

Unfortunately, the way the dependencies in lldb are laid out right now, 
it's impossible to compile lldb-server without a matching clang, even 
though the latter will not be used in any meaningful way. Changing that 
is one of my goals, but it's not something that's going to happen soon.

As for the architecture part of the question, you should be able to 
achieve something like that by setting the LLVM_TARGETS_TO_BUILD=AArch64 
cmake variable.


More information about the lldb-dev mailing list