The way to do this is to use build-script for the initial build and thereafter use ninja -C ../build/Ninja-WhateverConfigYoureUsing/swift-macosx-x86_64, which lets you specify a particular target. For instance, the target swift will rebuild just the main compiler executable, leaving other executables (like the SIL optimizer) and Swift modules untouched.
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 (swift and swiftc binaries).
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 swift to build the compiler incrementally.
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.