Skip to content

[Docs] Building on macOS #100

@Birch-san

Description

@Birch-san

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions