File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,8 +147,13 @@ public struct Packer: Sendable {
147147 let resolvedName = frameworkName ?? findFrameworkName ( for: name, in: binDir) ?? name
148148 let src = URL ( fileURLWithPath: " \( resolvedName) .framework/ \( resolvedName) " , relativeTo: binDir)
149149 guard FileManager . default. fileExists ( atPath: src. path) else {
150+ // if we can't find the binary, it might be a static framework that SwiftPM
151+ // did not copy into the .build directory. we don't need to pack it anyway.
150152 break
151153 }
154+ // if the binary is a static archive, don't embed it.
155+ // https://github.com/apple/llvm-project/blob/e716ff14c46490d2da6b240806c04e2beef01f40/llvm/include/llvm/Object/Archive.h#L33
156+ // swiftlint:disable:previous line_length
152157 if !isStaticBinary( at: src) {
153158 try await packFile (
154159 srcName: " \( resolvedName) .framework " ,
You can’t perform that action at this time.
0 commit comments