it almost looks like a prebuilts-linked issue, but in fact, is not. that target really is importing SwiftDiagnostics without an actual dependency edge.
this can be seen on Swiftinit, SwiftWarningControl does not include SwiftDiagnostics either directly, or transitively.
(And yes, we really should at least get a warning by default, but what's worse, neither xcodebuild nor the new swiftbuild build system implement --explicit-target-dependency-import-check for now!)