You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add prepare for index experimental build argument (swiftlang#7574)
This will be used by sourcekit-lsp to build the swiftmodule files it
needs for indexing.
Adds experimental-prepare-for-indexing flag to swift build. Creates a
llbuild manifest specific for the prepare build that skips generating
object files and linking of those files and calls swiftc to only create
the swiftmodule as quickly as it can.
### Motivation:
To support background indexing in sourcekit-lsp, it will request a
prepare for index build to build the swiftmodule files it needs to do
indexing. This build should be minimal to ensure indexing is fast so it
can respond to language server requests that require the index as soon
as possible.
### Modifications:
- Add an experimental-prepare-for-indexing flag to the BuildOptions and
pass it around to every that needs it.
- Build a custom llbuild manifest so that only the commands necessary
are added to the prepare build
- Add a target property that also ensures tool builds required for the
prepare build are performed as usual.
- In SwiftTargetBuildDescription, pass compile options that put the
swift compiler in prepare "mode".
- Ensure object files and binaries are only generated for tools when in
prepare mode.
### Result:
Implements prepare build mode without affecting regular build mode.
(cherry picked from commit 7bd34cc)
0 commit comments