How should one go about generating an Xcode project for swift-lldb using the monorepo?
I was using the old swift-lldb repo on the swift-5.0-branch (which had a Xcode project checked in already) and decided to try out the monorepo. I cloned apple/llvm-project and used the commands below on master branch:
git clone https://github.com/apple/llvm-project.git
cd llvm-project
cmake -B ./llvm-build -G Ninja \ -C ./lldb/cmake/caches/Apple-lldb-base.cmake \ -DLLVM_ENABLE_PROJECTS="clang;libcxx" ./llvm
cmake -B ./lldb-build -C ./lldb/cmake/caches/Apple-lldb-Xcode.cmake \ -DLLVM_DIR=${PATH_TO_LLVM_CONFIG_CMAKE}
Those steps got me an lldb.xcodeproj for plain lldb. I then tried it for swift-lldb and ran the following:
git clone https://github.com/apple/llvm-project.git
cd llvm-project
git checkout swift/master
git clone https://github.com/apple/swift.git
git clone https://github.com/apple/swift-cmark.git
mv swift-cmark cmark
cmake -B ./llvm-build -G Ninja \ -C ./lldb/cmake/caches/Apple-lldb-base.cmake \ -DLLVM_ENABLE_PROJECTS="clang;libcxx,cmark;swift" \ -DLLVM_EXTERNAL_PROJECTS="cmark;swift" \ ./llvm
cmake -B ./lldb-build -C ./lldb/cmake/caches/Apple-lldb-Xcode.cmake \ -DLLVM_DIR=${PATH_TO_LLVM_CONFIG_CMAKE} \ -DSwift_DIR=${PATH_TO_SWIFT_CONFIG_CMAKE}
But this time around command #7 fails with error:
CMake Error at ~/dev/llvm-project/swift/include/swift/Option/CMakeLists.txt:2 (swift_tablegen): Unknown CMake command "swift_tablegen".
https://github.com/apple/apple-llvm-infrastructure-tools/blob/master/docs/working-on-github-apple-llvm-project.md is outdated and seems to just do the same thing, clone swift and apple/llvm-project.
./swift/utils/build-script -r --lldb-build-with-xcode
succeeded in building swift-lldb but does not output an Xcode project.
Xcode version 11.0 (11A420a)
Cmake version 3.15.5
Ninja version 1.9.0