[Lldb-commits] [PATCH] D136578: [LLDB] [LoongArch] Fix build errors

Tiezhu Yang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Oct 23 23:24:35 PDT 2022


seehearfeel created this revision.
seehearfeel added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay.
Herald added a subscriber: StephenFan.
Herald added a project: All.
seehearfeel requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

When build LLDB on LoongArch used with the following commands:

git clone https://github.com/llvm/llvm-project.git
mkdir -p llvm-project/llvm/build
cd llvm-project/llvm/build
cmake .. -G "Ninja" -DLLVM_TARGETS_TO_BUILD="BPF" \

  -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="LoongArch" \
  -DLLVM_ENABLE_PROJECTS="clang;lldb" \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_BUILD_RUNTIME=OFF

ninja

there exist some build errors:

undefined reference to `lldb_private::process_linux::NativeRegisterContextLinux::DetermineArchitecture(unsigned long)'
undefined reference to `lldb_private::process_linux::NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(...)'

Add the minimal changes as simple as possible for LoongArch
to fix the above issues, even there are some empty functions,
then the built binary lldb can be found in the build/bin/
directory.

This is the first step, we will submit other more patches
step by step in the future, these small patches make an
easily understood change that can be verified by reviewers.

Signed-off-by: Tiezhu Yang <yangtiezhu at loongson.cn>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136578

Files:
  lldb/source/Plugins/Process/Linux/CMakeLists.txt
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp
  lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.h
  lldb/source/Plugins/Process/Utility/CMakeLists.txt
  lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_loongarch64.cpp
  lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_loongarch64.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136578.470054.patch
Type: text/x-patch
Size: 11940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221024/4a3eb01f/attachment.bin>


More information about the lldb-commits mailing list