[Lldb-commits] [lldb] [lldb][rpc] Fix build failures when building lldb-rpc-gen (PR #151603)
Martin Storsjö via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 6 02:09:34 PDT 2025
mstorsjo wrote:
> @chelcassanova @mstorsjo
>
> > But this seems to assume that everybody's cross builds are done in some specific sequence, with regards to how LLVM_HOST_TRIPLE and LLVM_DEFAULT_TARGET_TRIPLE are set (in my case, I just cross build with one single step, and both of those are set to the same in that single stage) - so I'm not really sure if we can use them like this for detecting what kind of situation we are in.
>
> LLVM_HOST_TRIPLE and LLVM_DEFAULT_TARGET_TRIPLE is not for detecting the cross builds. This is necessary to detect the Clang cross toolchain build. This is "one-step" build that builds the host tools (non cross builds), such as clang/clang++/llvm-objcopy/etc, and the target libraries using just-built Clang compiler, such as compiler_rt/libc++/libc++abi/libunwind. The libraries will be cross compiled in case LLVM_HOST_TRIPLE != LLVM_DEFAULT_TARGET_TRIPLE. So, the simple CMAKE_CROSSCOMPILING does not work for detection of that kind of LLVM/Clang build configurations.
Right - I see. But why does this build configuration have to affect whether it should build lldb-rpc-gen or not? Is it because the clang in this build can't manage to process the lldb headers (which are built for the current host)?
https://github.com/llvm/llvm-project/pull/151603
More information about the lldb-commits
mailing list