Skip to content

Conversation

@dgrove-oss
Copy link
Contributor

Creating a pull request primarily to get feedback. As discussed in #17, we need to be able to make changes to pthread_workqueue and keep dispatch tightly in synch with those changes. The approach is to make a fork of libpwq a git submodule and modify the dispatch build process to detect the presence of pthread_workqueue sources and build against them / statically link them into libdispatch.

The change to the top level Makefile.am in libdispatch is a bit clumsy, however I was unable to get anything else to actually fully work. Attempting to do a conditional addition of libpwq to SUBDIRS via defining a variable inside an automake conditional test fails to get libpwq included in the dependencies of libdispatch (so libpthread_workqueue isn't built before libdispatch).

For now, I am using my fork of libpwq as the upstream while things are changing quickly. Pull requests are being processed quickly upstream, so once things really stabilize we may want to have a more official upstream in the submodule.

Change build scripts to look for a checked out copy of
pthread_workqueue library and use it in preference to
the version installed in the system if it is available.
If we find our own pthread_workqueue, it will be statically
linked into libdispatch.
@MadCoder
Copy link
Contributor

Hi,

The pull request looks fine to me in principle, I want to double check a couple of things and given that I'm on vacation until Jan 4th it may take me some time to process that pull request (and @das is far away too).

If it works as expected, I'll ask you to squash the branch in a single commit to ease backporting to Darwin as usual :)

Please bear with me and the christmas delays.

@dgrove-oss
Copy link
Contributor Author

No worries. I'm also mostly on vacation until Jan 6th. Enjoy the break; catch up with you in the new year!

@dgrove-oss
Copy link
Contributor Author

Hi, I'm back from vacation. Let me know if I should go ahead with a rebase + squash or if we need to do some more work first. Thanks!

@danieleggert
Copy link

Sorry for the noise, but are there any updates on this?

@dgrove-oss
Copy link
Contributor Author

Hi @danieleggert. A change to allow libdispatch to be built using swift/utils/build-script was merged into the swift repository earlier today. Unfortunately that means this pull request needs a little reworking. In particular, it looks like we need some fixes to libpwq's autotools setup and/or how it is integrated into libdispatch to allow libpwq to be built outside of the source tree (in a separate build directory). I'm looking into it, but it may take a couple of days to get it worked out.

@dgrove-oss
Copy link
Contributor Author

I've rebased, squashed, tweaked, and opened a new pull request #37. Closing this one as obsolete.

@dgrove-oss dgrove-oss closed this Jan 27, 2016
@dgrove-oss dgrove-oss deleted the libpwq-integration branch February 16, 2016 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants