Need help resolving compiler error with "ImportObjcForwardDeclarations" feature enabled

Currently I work on a big iOS application with a lot of Objective-C and Swift files.
In order to prepare for eventual release of Swift 6, I enabled all of the Swift 6 upcoming feature flags to check if our Swift code base still compiles. I had no problems updating the code base and everything ran fine until I enabled ImportObjcForwardDeclarations.

Now I see only the generic Command SwiftCompile failed with a nonzero exit code error message with no indication about what exactly is causing the issue.

Is there any kind of tools to diagnose what could cause the error?