Skip to content
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

[SourceKit] Link with libdispatch on Linux #2862

Closed

Conversation

briancroom
Copy link
Contributor

What's in this pull request?

Some pains have been taken within SourceKit to make libdispatch an optional dependency (e.g. the WorkQueue abstraction in SourceKitSupport, however it is neither used everywhere, nor are any implementations available besides the one that uses libdispatch. Since libdispatch is intended to be available anywhere Swift is anyway, it seems reasonable to go ahead and use it here, at least for now.

This PR adds an include path to the libdispatch headers as well an explicit linking dependency on libdispatch for Linux. This has NFC in the default build configuration, since SourceKit doesn't build on Linux by default. Note that further work in the build script will be required to make libdispatch build before SourceKit during a standard build.

This supersedes #2704

cc @akyrtzi @modocache

Resolved bug number: (SR-1677)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@briancroom
Copy link
Contributor Author

@swift-ci please test

@briancroom
Copy link
Contributor Author

@swift-ci please test

@briancroom
Copy link
Contributor Author

The CI failures appear unrelated.

@briancroom
Copy link
Contributor Author

@gribozavr @akyrtzi @modocache Any feedback here would be appreciated!

@briancroom
Copy link
Contributor Author

@swift-ci please test

@@ -1,4 +1,4 @@
//===--- Concurrency-Mac.cpp ----------------------------------------------===//
//===--- Concurrency-libdispatch.cpp --------------------------------------===//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent rename, thanks!

@modocache
Copy link
Contributor

Looks good to me!! Thanks for the continued work on this.

@briancroom
Copy link
Contributor Author

I've made some minor adjustments to this to now also address dispatch-related linker failures that were occurring while building the SourceKit unit tests on Linux.

@briancroom
Copy link
Contributor Author

@swift-ci please test

sourcekitdInProc, sourcekitd-test, and complete-test need to be explicitly
linked with libdispatch on Linux to build properly.
This file builds fine as long as libdispatch is available, even on
non-Darwin platforms.
@mominul
Copy link
Contributor

mominul commented Jul 27, 2016

@gribozavr How about closing it? Because it has been superseded by #3594 and it has been already merged.

@gribozavr gribozavr closed this Jul 27, 2016
@briancroom
Copy link
Contributor Author

👍 big thanks to @jpsim for seeing this through!

MaxDesiatov pushed a commit that referenced this pull request Apr 19, 2021
[pull] swiftwasm from main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants