This is an archive of the discontinued LLVM Phabricator instance.

[lldb] skip host build for lldb_tblgen with LLDB_TABLEGEN_EXE set
ClosedPublic

Authored by manojgupta on Aug 13 2021, 1:34 PM.

Details

Summary

When cross compiling lldb-server, do not create a host build
for building lldb-tblgeb when LLDB_TABLEGEN_EXE is already
provided. This avoids an expensive and time-consuming build step
if lldb-tblgen was already built previously for host.

Diff Detail

Event Timeline

manojgupta created this revision.Aug 13 2021, 1:34 PM
manojgupta requested review of this revision.Aug 13 2021, 1:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2021, 1:34 PM

This is a local patch we have been carrying in Chrome OS.
What we do to cross compile lldb-server:

  1. Create host build to build tools like llvm-tblgen, clang-tblgen, lldb-tblgen
  2. Cross compile llvm and clang libraries using the just build *tblgen.
  3. Cross compile lldb by setting the path to pre-cross compiled libraries and *tblgen binaries from step 1.

Without this patch, cross compiling lldb-server start yet another host build just to build lldb-tblgen which we want to avoid.
Also see https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2851114/12/dev-util/lldb-server/lldb-server-12.0_pre416183.ebuild

JDevlieghere accepted this revision.Aug 13 2021, 2:01 PM

Looks reasonable to me.

This revision is now accepted and ready to land.Aug 13 2021, 2:01 PM