mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Fix issue that caused code completion to fail using compile_flags.txt
The compiler name shouldn’t be part of the build settings.
This commit is contained in:
@@ -126,14 +126,8 @@ package actor FixedCompilationDatabaseBuildSystem: BuiltInBuildSystem {
|
||||
package func sourceKitOptions(
|
||||
request: TextDocumentSourceKitOptionsRequest
|
||||
) async throws -> TextDocumentSourceKitOptionsResponse? {
|
||||
let compilerName: String
|
||||
switch request.language {
|
||||
case .swift: compilerName = "swiftc"
|
||||
case .c, .cpp, .objective_c, .objective_cpp: compilerName = "clang"
|
||||
default: return nil
|
||||
}
|
||||
return TextDocumentSourceKitOptionsResponse(
|
||||
compilerArguments: [compilerName] + compilerArgs + [request.textDocument.uri.pseudoPath],
|
||||
compilerArguments: compilerArgs + [request.textDocument.uri.pseudoPath],
|
||||
workingDirectory: try? configPath.deletingLastPathComponent().filePath
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user