[Lldb-commits] [PATCH] D158085: [LLDB][Docs] Update cross compilation docs and examples

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 18 10:41:51 PDT 2023


bulbazord added a comment.

In D158085#4598601 <https://reviews.llvm.org/D158085#4598601>, @DavidSpickett wrote:

>> It could be useful to also document some other interesting cross-compilation options like CMAKE_TOOLCHAIN_FILE
>
> So this is the way CMake prefers you to do it, but I don't really understand the best practice so I'll leave it out for now. We have plenty of caches that directly set the system and processor name in llvm already, so I am in good (/not as good as could be) company.

IMO it's usually the safest/most sustainable way to maintain cross-compilation jobs. CMake documents all of the intricacies with cross-compiling to other platforms here on their page documenting cmake toolchains: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
I don't think we need to include all the intricacies, but it might be nice to maintain a link to the cmake documentation so people can self-service a bit when they encounter issues.

>> or mention the use of CMake caches, but if you're unfamiliar or aren't comfortable listing those that's ok too.
>
> This seems like a general tip so I'm not sure it belongs here, beyond the fact that you might have 99 options to get a cross build, but want to tweak just one on top. Again, bit of a generic tip.
>
> As to adding a cache file, one thing the Github poster mentioned is that if you don't set `LLVM_NATIVE_TOOL_DIR` we appear to compile the host tools for you now. So I'd like to land this as is, then I'll look into that and see if it can be even simpler.

Sounds good to me. Thanks for working on this!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158085



More information about the lldb-commits mailing list