We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a784a6 commit e439947Copy full SHA for e439947
Sources/Build/BuildPlan/BuildPlan.swift
@@ -448,7 +448,18 @@ public class BuildPlan: SPMBuildCore.BuildPlan {
448
449
public func createAPIToolCommonArgs(includeLibrarySearchPaths: Bool) throws -> [String] {
450
let buildPath = buildParameters.buildPath.pathString
451
- var arguments = ["-I", buildPath]
+ var arguments = ["-I"]
452
+
453
+ if let target = targets.compactMap({
454
+ switch $0 {
455
+ case .swift(let desc): return desc
456
+ case .clang: return nil
457
+ }
458
+ }).first {
459
+ arguments += [target.moduleOutputPath.pathString]
460
+ } else {
461
+ arguments += [buildPath]
462
463
464
// swift-symbolgraph-extract does not support parsing `-use-ld=lld` and
465
// will silently error failing the operation. Filter out this flag
0 commit comments