Archive Failing for iPhoneOS SDK in Xcode 26

When i am trying to archive a framework for ML, using below command:

xcodebuild -workspace "./src/MLProject.xcworkspace" -configuration "Release" -sdk "iphoneos" -archivePath "./gen/out/Archives/Release-iphoneos/MLProject" -scheme "MLProject" -derivedDataPath "./gen/out/" archive BUILD_LIBRARY_FOR_DISTRIBUTION=YES SKIP_INSTALL=NO

The same command used to work fine on Xcode 16.4. Attached is the detailed error

The error message says:

Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.

Please follow through on that — it is extremely important so that the root cause of this issue in the compiler is addressed. Please share your report number here for reference.

Further down, the message says:

3.	While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for MLProject)
4.	While running pass #90956 SILFunctionTransform "CopyPropagation" on SILFunction "@$s5MLProject23MLProjectTextRowObservationCyACSayAA0bD0CGcfc".
 for 'init(_:)' (at /Users/Desktop/xcode/MLProject/src/Frameworks/MLProject/MLProject/OCRScanner/MLProjectTextObservation.swift:135:5)

Bullet point 3 shows this is the complier running some of its optimization passes on the named init(_:) function in your code. You can try selectively disabling this optimization for that function by adding @_optimize(none) on the line before that init function is defined. Let me know how that goes.

— Ed Ford,  DTS Engineer

Archive Failing for iPhoneOS SDK in Xcode 26
 
 
Q