I am new to the community and currently participating in the Swift Mentorship Program. I'm trying to contribute to the Swift compiler. So far, I have followed the instructions in this guide to set up my environment and have reached the section on using Ninja with Xcode.
However, I'm having trouble understanding how to correctly set up the compiler and perform a dry run. Could someone please provide a brief summary on how to get started?
In your swift directory, make sure you've done ./utils/update-checkout --clone-with-ssh first. Then this will build enough to run tests:
./utils/build-script -r --skip-build-benchmarks
(The -r flag gives you a release build of the compiler; without that, building the stdlib will take forever. The second flag is optional. I don't build the benchmarks, but you can if you want. )
Now you can run the validation tests like so:
cd ../build/Ninja-RelWithDebInfoAssert/swift-macosx-arm64
../ninja-build/ninja check-swift-validation
To run individual tests without rebuilding the stdlib every time, I use this invocation, but you'll need to adjust the paths: