@@ -22,32 +22,36 @@ extension Compiler {
2222 var result = [ SDK: [ TSCAbsolutePath] ] ( )
2323
2424 for sdk in sdks {
25- let dsymPath = descriptionPackage. buildDebugSymbolPath ( buildConfiguration: buildConfiguration, sdk: sdk, target: target)
26- guard fileSystem. exists ( dsymPath) else { continue }
27- let debugSymbol = DebugSymbol (
28- dSYMPath: dsymPath,
29- target: target,
25+ let dsymPath = descriptionPackage. buildDebugSymbolPath (
26+ buildConfiguration: buildConfiguration,
3027 sdk: sdk,
31- buildConfiguration : buildConfiguration
28+ target : target
3229 )
33- let dumpedDSYMsMaps = try await extractor. dump ( dwarfPath: debugSymbol. dwarfPath)
30+ guard fileSystem. exists ( dsymPath) else { continue }
31+
32+ let dwarfPath = extractor. dwarfPath ( for: target, dSYMPath: dsymPath)
33+ let dumpedDSYMsMaps = try await extractor. dump ( dwarfPath: dwarfPath)
3434 let bcSymbolMapPaths : [ TSCAbsolutePath ] = dumpedDSYMsMaps. values. compactMap { uuid in
3535 let path = descriptionPackage. productsDirectory (
36- buildConfiguration: debugSymbol . buildConfiguration,
37- sdk: debugSymbol . sdk
36+ buildConfiguration: buildConfiguration,
37+ sdk: sdk
3838 )
3939 . appending ( component: " \( uuid. uuidString) .bcsymbolmap " )
4040 guard fileSystem. exists ( path) else { return nil }
4141 return path
4242 }
43- result [ sdk] = [ debugSymbol . dSYMPath ] + bcSymbolMapPaths
43+ result [ sdk] = [ dsymPath ] + bcSymbolMapPaths
4444 }
4545 return result
4646 }
4747}
4848
4949extension DescriptionPackage {
50- fileprivate func buildDebugSymbolPath( buildConfiguration: BuildConfiguration , sdk: SDK , target: ScipioResolvedModule ) -> TSCAbsolutePath {
50+ fileprivate func buildDebugSymbolPath(
51+ buildConfiguration: BuildConfiguration ,
52+ sdk: SDK ,
53+ target: ScipioResolvedModule
54+ ) -> TSCAbsolutePath {
5155 productsDirectory ( buildConfiguration: buildConfiguration, sdk: sdk)
5256 . appending ( component: " \( target. name) .framework.dSYM " )
5357 }
0 commit comments