Swift iOS app fails with Objective-C ARC errors when importing C++ package dependency

Our iOS app has a C++ package dependency built with Objective-C ARC off. When building the app it successfully builds the dependency. ARC is also off at the project level, not just target.

However, when Xcode gets to the main app target, every file importing that dependency fail with the following errors:

'release' is unavailable: not available in automatic reference counting mode
'release' has been explicitly marked unavailable here In file included from <module-includes>:37:
ARC forbids explicit message send of 'release' In file included from <module-includes>:37:

Since the dependency built successfully and Objective-C ARC is disabled in the project, I don't understand why these errors occur, they're currently blocking us from migrating from CocoaPods to SwiftPM.

Has anybody encountered this or might know how to fix it?

I've identified the issue and provided a minimal example at apple/swift-package-manager: C flags don't apply to Objective-C headers when imported into Swift targets · Issue #7171 · apple/swift-package-manager · GitHub.