I don't think there's great documentation, unfortunately.
You can list all ninja targets with ninja -t targets. The ones you're likely interested in are:
-
ninja swift: as mentioned above, builds the swift compiler without the stdlib (swiftandswiftcbinaries). -
ninja swift-stdlib: builds the swift stdlib.- This takes a long time. If you want to test only the compiler, you'll need to build the stdlib just once. Then, you can just run
ninja swiftto build the compiler incrementally.
- This takes a long time. If you want to test only the compiler, you'll need to build the stdlib just once. Then, you can just run
-
ninja sil-opt: builds the SIL optimizer utility, useful for testing SIL transformations.
@codafi has a great post on tips for building and testing, with a focus on testing.