When I used Xcode, I did have a build/Ninja-.../swift-macosx-arm64/bin
but it did not update with my code changes when I rebuilt the project with cmd + b
, only build/Ninja-.../swift-macosx-arm64/bootstrapping0/bin
used to reflect my code changes.
I gave up on using Xcode now, I'll just use a naked text editor like Vim or Vscode and see warnings and errors when compiling in the terminal.
I'm using the following commands and everything is finally working fine!
# Clean first build
utils/build-script --release --debug-swift --clean
# Incremental build
ninja -C ../build/Ninja-ReleaseAssert+swift-DebugAssert/swift-macosx-arm64 && ../build/Ninja-ReleaseAssert+swift-DebugAssert/swift-macosx-arm64/bin/swiftc --version
# Compile and run main.swift file
../build/Ninja-ReleaseAssert+swift-DebugAssert/swift-macosx-arm64/bin/swiftc -sdk $(xcrun --show-sdk-path) && ./main
Thank you much for your help, those are exactly the pointers I needed.