Skip to content

Commit

Permalink
Forward cross-compilation args when indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
kabiroberai committed Jan 16, 2025
1 parent f60752b commit b5a9769
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/BuildSystemIntegration/SwiftPMBuildSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,15 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
if let configuration = options.swiftPMOrDefault.configuration {
arguments += ["-c", configuration.rawValue]
}
if let triple = options.swiftPMOrDefault.triple {
arguments += ["--triple", triple]
}
if let swiftSDKsDirectory = options.swiftPMOrDefault.swiftSDKsDirectory {
arguments += ["--swift-sdks-path", swiftSDKsDirectory]
}
if let swiftSDK = options.swiftPMOrDefault.swiftSDK {
arguments += ["--swift-sdk", swiftSDK]
}
arguments += options.swiftPMOrDefault.cCompilerFlags?.flatMap { ["-Xcc", $0] } ?? []
arguments += options.swiftPMOrDefault.cxxCompilerFlags?.flatMap { ["-Xcxx", $0] } ?? []
arguments += options.swiftPMOrDefault.swiftCompilerFlags?.flatMap { ["-Xswiftc", $0] } ?? []
Expand Down

0 comments on commit b5a9769

Please sign in to comment.