Skip to content

Conversation

@jthackray
Copy link
Contributor

Right now, cross-building lldb means either installing a native lldb-tblgen by hand (non-trivial, as CMake is painful) or first building all of native clang because of how the CMake rules work, which is not fun.

In keeping with the pattern established by llvm-tblgen and clang-tblgen, install lldb-tblgen to ease cross-compilation.

…liner)

Right now, cross-building `lldb` means either installing a native
`lldb-tblgen` by hand (non-trivial, as CMake is painful) or first building
all of native clang because of how the CMake rules work, which is not fun.

In keeping with the pattern established by llvm-tblgen and clang-tblgen,
install lldb-tblgen to ease cross-compilation.

Co-authored-by: Ross Burton <[email protected]>
@llvmbot
Copy link
Member

llvmbot commented Sep 19, 2025

@llvm/pr-subscribers-lldb

Author: Jonathan Thackray (jthackray)

Changes

Right now, cross-building lldb means either installing a native lldb-tblgen by hand (non-trivial, as CMake is painful) or first building all of native clang because of how the CMake rules work, which is not fun.

In keeping with the pattern established by llvm-tblgen and clang-tblgen, install lldb-tblgen to ease cross-compilation.


Full diff: https://github.com/llvm/llvm-project/pull/159812.diff

1 Files Affected:

  • (modified) lldb/utils/TableGen/CMakeLists.txt (+1)
diff --git a/lldb/utils/TableGen/CMakeLists.txt b/lldb/utils/TableGen/CMakeLists.txt
index 0ac010bcda355..ce96dddd44201 100644
--- a/lldb/utils/TableGen/CMakeLists.txt
+++ b/lldb/utils/TableGen/CMakeLists.txt
@@ -8,6 +8,7 @@ if (NOT DEFINED LLDB_TABLEGEN_EXE)
     set(LLVM_LINK_COMPONENTS Support)
 
     add_tablegen(lldb-tblgen LLDB
+      DESTINATION "${CMAKE_INSTALL_BINDIR}"
       LLDBOptionDefEmitter.cpp
       LLDBPropertyDefEmitter.cpp
       LLDBTableGen.cpp

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, tablegen makes cross compiling more of a hassle than it could be. LGTM.

@JDevlieghere JDevlieghere merged commit 0ce6052 into main Sep 19, 2025
11 checks passed
@JDevlieghere JDevlieghere deleted the users/jthackray/lldb-tblgen-install branch September 19, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants