Swift Package Manager's binaryTarget with local XCFramework crashes Xcode

Hello,

I've create a sample Swift package which uses binaryTarget to add local XCFramework dependency to a package. XCFramework itself contain two static libraries: One for iOS simulator, and one for iOS device. The result is that Xcode 13 crashes, and when build from command line there is an error, that doesn't help much.

Here is sample project download site:

https://drive.google.com/file/d/1SBw77DwUOlF40EEXEJQr3i9M-afAm4lv/view?usp=sharing

Here is the result when building from command line:

swift build -Xswiftc "-sdk" -Xswiftc "`xcrun --sdk iphonesimulator --show-sdk-path`" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios15.0-simulator" -v

/usr/bin/xcrun --sdk macosx --show-sdk-platform-path

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -print-target-info

/usr/bin/xcrun --sdk macosx --find xctest

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -print-target-info

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -print-target-info -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -print-target-info

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -emit-supported-features /var/folders/65/b8ghmm157gn3c_m8cnmxbx2r0000gn/T/TemporaryDirectory.WtlPlf/dummyInput-1.swift

Illegal instruction: 4

Here is stack trace from Xcode:

Process:               Xcode [3774]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               13.0 (19234)
Build Info:            IDEFrameworks-19234000000000000~16 (13A233)
App Item ID:           497799835
App External ID:       844005016
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [3774]
User ID:               501

Date/Time:             2021-10-14 17:43:33.627 +0300
OS Version:            macOS 11.6 (20G165)
Report Version:        12
Bridge OS Version:     5.5 (18P4759a)
Anonymous UUID:        5B874F5B-A18E-16E7-3084-2A0B79B218C4


Time Awake Since Boot: 7600 seconds

System Integrity Protection: enabled

Crashed Thread:        5  Dispatch queue: -[IDEExecutionEnvironment initWithWorkspaceArena:] (QOS: UNSPECIFIED)

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [3774]
...