TL;DR
download my pre-built:
MD5: 32241cb3e093b15c58bd40200dc2fd76
MD5: 169fd4d3fdffa5a136cbe77aac759cdc
prepare building lldb
Install editline- Install pcre && swig
- Read code-signing.txt
building
- clone llvm-project
- checkout 8.0 branch
cd llvm
run build-llvm.sh
build-llvm.sh
#!/bin/bash
set -e
mkdir build && cd build
output=/tmp/llvm-build
cmake -DCMAKE_INSTALL_PREFIX=${output} \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLDB_CODESIGN_IDENTITY='' \
-DLLDB_BUILD_FRAMEWORK=ON \
-DLLVM_ENABLE_PROJECTS="all" \
-DLLVM_CREATE_XCODE_TOOLCHAIN=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
-GNinja \
..
ninja
ninja install-xcode-toolchain
echo build finish.
echo toolchain installed at ${output}
Note: you need install cmake and ninja first.
sign LLDB.framework
codesign --deep --force --verbose --sign "Developer ID Application: XXX (YYY)" LLDB.framework
if success, output:
signed bundle with Mach-O thin (x86_64) [com.apple.LLDB.framework]