Skip to content

Commit

Permalink
Fallback for Xcode <11.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mikchmie committed Feb 1, 2022
1 parent d870f34 commit f089f86
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/CarthageKit/MachHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ extension MachHeader {
)

return task.launch(standardInput: nil)
.flatMapError { _ -> SignalProducer<TaskEvent<Data>, TaskError> in
// Fallback for 'objdump' in LLVM <9.0.0 (Xcode <11.4) which uses `-` as option prefix instead of `--`
Task("/usr/bin/xcrun", arguments: [
"objdump",
"-macho",
"-private-header",
"-non-verbose",
url.resolvingSymlinksInPath().path,
]
).launch(standardInput: nil)
}
.ignoreTaskData()
.map { String(data: $0, encoding: .utf8) ?? "" }
.filter { !$0.isEmpty }
Expand Down

0 comments on commit f089f86

Please sign in to comment.