lldb-mi
lldb-mi copied to clipboard
[Docs] Building on macOS
The "Building against system LLDB" instructions didn't work out-of-the-box on M1 macOS Monterey 12.4 with XCode 13.2.1.
Here's a known-good sequence of instructions. Pretty similar to the existing "Building against custom LLDB" instructions.
git clone --depth 1 https://github.com/llvm/llvm-project.git
cd llvm-project
# I think you can remove CMAKE_INSTALL_PREFIX because we do not attempt installation
cmake \
-DLLDB_USE_SYSTEM_DEBUGSERVER=ON \
-DLLDB_INCLUDE_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS='lldb;clang' \
-DCMAKE_INSTALL_PREFIX=prefix \
-S llvm -B build -G Ninja
cmake --build build --target lldb
cd ..
git clone --depth 1 https://github.com/lldb-tools/lldb-mi.git
cd lldb-mi
cmake -DLLVM_DIR=../llvm-project/build/lib/cmake/llvm .
cmake --build .
# enjoy your new lldb-mi
./src/lldb-mi --help
My mac is M1 macOS Monterey 12.4, but I can build against system lldb..🤔
Did you manage to build a working version? https://github.com/lldb-tools/lldb-mi/issues/101