lldb-mi icon indicating copy to clipboard operation
lldb-mi copied to clipboard

[Docs] Building on macOS

Open Birch-san opened this issue 2 years ago • 2 comments

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

Birch-san avatar Jun 19 '22 22:06 Birch-san

My mac is M1 macOS Monterey 12.4, but I can build against system lldb..🤔

LimingFang avatar Jun 23 '22 04:06 LimingFang

Did you manage to build a working version? https://github.com/lldb-tools/lldb-mi/issues/101

H-G-Hristov avatar Sep 09 '22 07:09 H-G-Hristov