Skip to content

Commit

Permalink
Add -F flag for xcframework dependency
Browse files Browse the repository at this point in the history
Close #7580

Replace -I with -F is enough to fix the issue. Keeping -I for compatibility reason in case there are other cases where -I is needed.
  • Loading branch information
Kyle-Ye committed Sep 25, 2024
1 parent f55fbef commit 0cbb6ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/Build/BuildPlan/BuildPlan+Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ extension BuildPlan {
let libraries = try self.parseXCFramework(for: target, triple: swiftTarget.buildParameters.triple)
for library in libraries {
library.headersPaths.forEach {
swiftTarget.additionalFlags += ["-I", $0.pathString, "-Xcc", "-I", "-Xcc", $0.pathString]
swiftTarget.additionalFlags += [
"-I", $0.pathString, "-Xcc", "-I", "-Xcc", $0.pathString,
"-F", $0.pathString, "-Xcc", "-F", "-Xcc", $0.pathString,
]
}
swiftTarget.libraryBinaryPaths.insert(library.libraryPath)
}
Expand Down

0 comments on commit 0cbb6ef

Please sign in to comment.