-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[6.0] Add prepare for index experimental build argument #7638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nkcsgexi
approved these changes
Jun 5, 2024
@swift-ci please test |
dschaefer2
approved these changes
Jun 5, 2024
The failure is a change to llbuildTargetName. Code should be
|
Looks like we need to cherry-pick the cross compilation changes first 😅. |
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)
…wiftlang#7627) This allows the C module to be targeted directly with the --target argument. It is a no-op however, since the output of C modules are not required for indexing. (cherry picked from commit 09efb06)
(cherry picked from commit d5f6260)
@swift-ci please test |
@swift-ci Please test Windows |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
swift build
that builds only the parts needed for semantic functionality/indexing (ie. modules of dependencies, but no object files/libraries/etc).