When I built the swift toolchain, I encountered some problems, I don't know how to solve it, and every time I execute ./swift/utils/build-toolchain com.xxxx, it will restart the build, it takes a lot of time, how can I do it Save time by not rebuilding.
The following is the error message:
-- Installing: /Users/xxx/Desktop/swift-project/build/buildbot_osx/intermediate-install/macosx-arm64/Library/Developer/Toolchains/swift-LOCAL-2023-06-16-a.xctoolchain/usr/../System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/macosx/crashlog_scripted_process.py
CMake Error at cmake_install.cmake:49 (file):
file INSTALL cannot find
"/Users/xxx/Desktop/swift-project/build/buildbot_osx/lldb-macosx-arm64/bin/LLDB.framework/Versions/A/Resources/Python/lldb/macosx/heap.py":
No such file or directory.
Call Stack (most recent call first):
/Users/xxx/Desktop/swift-project/build/buildbot_osx/lldb-macosx-arm64/source/cmake_install.cmake:55 (include)
/Users/xxx/Desktop/swift-project/build/buildbot_osx/lldb-macosx-arm64/cmake_install.cmake:64 (include)
FAILED: source/API/CMakeFiles/install-liblldb /Users/xxx/Desktop/swift-project/build/buildbot_osx/lldb-macosx-arm64/source/API/CMakeFiles/install-liblldb
cd /Users/xxx/Desktop/swift-project/build/buildbot_osx/lldb-macosx-arm64/source/API && /usr/local/Cellar/cmake/3.26.0/bin/cmake -DCMAKE_INSTALL_COMPONENT="liblldb" -P /Users/yjl/Desktop/swift-project/build/buildbot_osx/lldb-macosx-arm64/cmake_install.cmake
[5/8][ 62%][1.095s] Running utility command for lldb-python
ninja: build stopped: subcommand failed.
ERROR: command terminated with a non-zero exit status 1, aborting
My execution command is as follows:
git clone --branch swift-5.8.1-RELEASE GitHub - apple/swift: The Swift Programming Language swift
./swift/utils/update-checkout --clone --tag swift-5.8.1-RELEASE
./swift/utils/build-toolchain com.xxxx
While utils/build-toolchain may internally call utils/build-script, it's an implementation detail and shouldn't be relied on.
The section you've linked to is for CI setup. If you're building for local use, you should follow instructions in docs/GettingStarted.md, which explain how to build with utils/build-script end to end.