Xcode 11.4: Invalid debug info found, debug info will be stripped

I have a new warning per every target after upgrading to Xcode 11.4:


Invalid debug info found, debug info will be stripped


This has never been the case for my code base before. Anything I can do to resolve these warning? Am I safe to release to the AppStore with these warnings?


For one of the targets detailed info is:


mismatched subprogram between llvm.dbg.label label and !dbg attachment
  call void @llvm.dbg.label(metadata !137) #2, !dbg !203
label %138
double (i8*)* @"\01__hidden#1918_"
!137 = !DILabel(scope: !138, name: "zulu_time", file: !10, line: 196)
!138 = distinct !DISubprogram(name: "parseTimezone", scope: !10, file: !10, line: 161, type: !139, scopeLine: 161, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !171, retainedNodes: !196)
!203 = !DILocation(line: 196, column: 1, scope: !100, inlinedAt: !101)
!100 = distinct !DISubprogram(name: "__hidden#1928_", scope: !10, file: !10, line: 161, type: !11, scopeLine: 161, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !6)
mismatched subprogram between llvm.dbg.label label and !dbg attachment
  call void @llvm.dbg.label(metadata !347), !dbg !371
label %55
i32 (i8*, ...)* @"\01__hidden#1920_"
!347 = !DILabel(scope: !348, name: "end_getDigits", file: !10, line: 140)
!348 = distinct !DISubprogram(name: "getDigits", scope: !10, file: !10, line: 109, type: !349, scopeLine: 109, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !171, retainedNodes: !351)
!371 = !DILocation(line: 140, column: 1, scope: !315)
!315 = distinct !DISubprogram(name: "__hidden#1922_", scope: !10, file: !10, line: 109, type: !11, scopeLine: 109, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !6)
DICompileUnit not listed in llvm.dbg.cu
!171 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "Apple clang version 11.0.3 (clang-1103.0.32.29)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !12, retainedTypes: !172, imports: !180, nameTableKind: None)
ld: warning: Invalid debug info found, debug info will be stripped
!dbg attachment points at wrong subprogram for function
!126 = distinct !DISubprogram(name: "__hidden#2776_", scope: !35, file: !35, line: 259, type: !36, scopeLine: 259, s: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !11)
double (%0*, i8*, %0*, i32)* @"\01__hidden#2776_"
  br i1 %41, label %42, label %90, !dbg !152, !llvm.loop !155
!156 = !DILocation(line: 283, column: 3, scope: !157)
!157 = distinct !DISubprogram(name: "__hidden#2776_", scope: !35, file: !35, line: 259, type: !36, scopeLine: 259, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !158)
!157 = distinct !DISubprogram(name: "__hidden#2776_", scope: !35, file: !35, line: 259, type: !36, scopeLine: 259, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !158)
ld: warning: Invalid debug info found, debug info will be stripped
mismatched subprogram between llvm.dbg.label label and !dbg attachment
same issue here - GoogleCastSDK-ios-4.4.7 via CocoaPods!
I filed FB7746173 with a repro case
Xcode 12 Beta 1 includes fixes for these two issues:
You will need to recompile all of the code statically linked into your app to fix the "ld: invalid debug info found" error, including code statically linked from 3rd party libraries.



Is there any update? The XCode 11.6 still has the same behavior?
@ovilla675, please see an earlier answer from a colleague -- the issue is addressed in the Xcode 12 betas.
I'm getting this errors in 12.5 (M1) but not in 12.2 (Intel) , both stuck in "processing" on AppStoreConnect submit during thinning stage.
Adhoc export doesn't fail in 12.2 but fails in 12.5, but 12.2 does not help.

I'm stuck for a week now with no way to submit App with bitcode enabled( required for tvOS).
No external/third party frameworks are in the project.


_DICompileUnit not listed in llvm.dbg.cu

!143 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_11, file: !5, producer: "_hidden#39", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, enums: !10, nameTableKind: None, sysroot: "_hidden#40", sdk: "_hidden#41")

ld: warning: Invalid debug info found, debug info will be stripped

DICompileUnit not listed in llvm.dbg.cu

!1429 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_11, file: !5, producer: "_hidden#39", isOptimized: true, runtimeVersion: 0, emissionKind: NoDebug, enums: !10, nameTableKind: None, sysroot: "_hidden#40", sdk: "_hidden#41")

ld: warning: Invalid debug info found, debug info will be stripped

DICompileUnit not listed in llvm.dbg.cu_

The issue (DICompileUnit not listed in llvm.dbg.cu) was caused by Clang's
  • Rpass=loop-vectorize

option. I'm not clear why it would cause bitcode process to fail, since all appleTVs should support Neon instruction.
removing loop-vectorize has addressed it, but not optimal.
Xcode 11.4: Invalid debug info found, debug info will be stripped
 
 
Q