Xcode 14 Beta 6: -all_load in Test target causes symbol duplication

This issue is not reproducible on Xcode 13.2.1

I'm migrating our projects on Xcode 14. I noticed that test targets that use HOST_APP and BUNDLE_LOADER builds settings began to spam the next message into logs for every Objective-C class that is linked to the app from other frameworks:

objc[49880]: Class ... is implemented in both ... and ... . One of the two will be used. Which one is undefined.

Test targets that doesn't have these settings (framework's test target, for example) are not doing it.

We have ~100 frameworks, many of them contains both Objective-C and Swift code, all of their build settings are managed by common xcconfig files. To simplify build settings management, we set -ObjC -all_load to OTHER_LDFLAGS in a common xcconfig file that is applied to every target (including test target). It didn't cause any issues until now.

So, is it something that need to be fixed on our side (due to changes in Xcode 14) or is it a regression issue that is expected to be fixed in the next releases?

On our side we can fix it by removing -all_load flag in test targets with host app, but is sounds like a workaround.

This is an example project: https://www.icloud.com/iclouddrive/0ac_20AOzHI-l-ZTXSWTtm5WQ#LinkIssue It's not managed by xcconfig files, I've only added -ObjC -all_load to OTHER_LDFLAGS. In this project the issue is only reproducible on Xcode 14. Just run tests

Linker optionall_load can lead to duplicate symbol error, depending on framework dependencies. check https://developer.apple.com/videos/play/wwdc2022/110362/ ~9:30min

Xcode 14 Beta 6: -all_load in Test target causes symbol duplication
 
 
Q