the default swift build command is quite useless in projects of moderate or higher complexity.
it does not build the project’s test targets (for that you need --build-tests), but at the same time it does build all the testing support targets, even if none of those targets end up in an actual product vended by the package.
this matters because the testing support targets will not always be buildable under the configurations where we want to build the actual package products for. for example, if you are using --static-swift-stdlib, and one of those support targets imports Testing, you are out of luck.
this would manageable if there were a way to tell SwiftPM to “just build all package products”, but to the best of my knowledge, there is not. instead, each product must be built individually, sequentially, which forces SwiftPM to perform dependency resolution and build graph verification multiple times and prevents the build system from parallelizing compilation across the different products.