swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.21k stars 264 forks source link

Inspect the build setup to determine the extra flags to pass to the `swift build` invocations during preparation #1445

Closed ahoppen closed 1 month ago

ahoppen commented 1 month ago

The BuildParameters that we were previously inspecting contained some parameters that SwiftPM synthesizes and that weren’t specified on the command line. For example, it contains -g for all languages. This causes us to add -Xswiftc -g -Xcc -g -Xcxx -g to the swift build invocations for preparation, which is not necessary.

ahoppen commented 1 month ago

@swift-ci Please test