Skip to content

Add --destination option for cross-compiled projects #330

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

Closed
wants to merge 1 commit into from
Closed

Add --destination option for cross-compiled projects #330

wants to merge 1 commit into from

Conversation

MaxDesiatov
Copy link
Contributor

Currently SourceKit-LSP can't be used for projects that can't be compiled on a host platform and need to be cross-compiled with an appropriate destination file passed to swift build. This PR adds a --destination option to SourceKit-LSP that is then passed to SwiftPM workspaces, which in my undestanding is equivalent to passing --destination to the underlying swift build invocations.

@MaxDesiatov MaxDesiatov added the enhancement New feature or request label Oct 8, 2020
@MaxDesiatov
Copy link
Contributor Author

@swift-ci please test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci please test Linux platform

@benlangmuir
Copy link
Contributor

We should add a test to SwiftPMWorkspaceTests for this. I think you could take a test like testBuildSetup and instead of checking the customization of BuildFlags, check the customization on the destination.

@MaxDesiatov
Copy link
Contributor Author

It does not seem to work as I expected, Looks like initializing a Workspace with these arguments is not fully equivalent to the swift build --destination CLI invocation, the inferred SDK path is not the same, which leads to issues. I'm closing this for now until a better solution is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants