I'm getting an error telling me swift-run
is unknown or missing. Here is my process so far:
The command I tried after completing Getting Started:
utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos \
--skip-tvos --skip-early-swift-driver --skip-early-swiftsyntax \ 25s
--swift-darwin-supported-archs "$(uname -m)" --release-debuginfo \
--sccache --swift-disable-dead-stripping --bootstrapping=hosttools \
-l -b -p --swiftsyntax --swiftformat --sourcekit-lsp --sourcekit-lsp-lint
Configuration:
Apple M1
16 GB
Sonoma 14.5
WezTerm -> Tmux -> ZSH
The following commands build without failure:
utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos \
--skip-tvos --skip-early-swift-driver --skip-early-swiftsyntax \ 25s
--swift-darwin-supported-archs "$(uname -m)" --release-debuginfo \
--sccache --swift-disable-dead-stripping --bootstrapping=hosttools \
-l -b
utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos \
--skip-tvos --skip-early-swift-driver --skip-early-swiftsyntax \ 25s
--swift-darwin-supported-archs "$(uname -m)" --release-debuginfo \
--sccache --swift-disable-dead-stripping --bootstrapping=hosttools \
-l
utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos \
--skip-tvos --skip-early-swift-driver --skip-early-swiftsyntax \ 25s
--swift-darwin-supported-archs "$(uname -m)" --release-debuginfo \
--sccache --swift-disable-dead-stripping --bootstrapping=hosttools \
-b
utils/build-script --skip-build-benchmarks --skip-ios --skip-watchos \
--skip-tvos --skip-early-swift-driver --skip-early-swiftsyntax \ 25s
--swift-darwin-supported-archs "$(uname -m)" --release-debuginfo \
--sccache --swift-disable-dead-stripping --bootstrapping=hosttools
Adding back just the -p flag, I get the following error:
--- bootstrap: error: unable to find swiftc at /Users/my/Developer/swift-project/build/Ninja-RelWithDebInfoAssert/toolchain-macosx-arm64/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc
I couldn't figure out how to get the toolchain folder into the build folder for the longest time. Then it occurred to me --install-all might do it (I cannot remember why). This fixed the missing toolchain folder for swiftc
and other executables, but now I'm stumped on this error:
error: unknown or missing subcommand 'swift-run'
I have swift
installed through Xcode so swift run
is available on the CLI. Any thoughts would greatly appreciated.