[swift-corelibs-dev] libdispatch prep for integration to the rest of swift-corelibs

Philippe Hausler phausler at apple.com
Wed Jan 13 17:04:23 CST 2016


Tony brought up an important point about the prep for integration this morning: the blocks runtime from libblocksruntime-dev will be incompatible with the layout of blocks referenced from swift since the object size there is 2 uint32’s bigger to handle the RR (we don’t have objc). Without modifying clang and the runtime we won’t have a way to properly handoff blocks back and forth w/o objc.

I am currently taking a look at this to see what we can do to add an option to the clang code-gen to properly emit this structural difference. This isn’t a big issue for Foundation to CF since we don’t have many block APIs but dispatch is mostly blocks and that might pose an issue.

> On Jan 13, 2016, at 2:55 PM, David P Grove <groved at us.ibm.com> wrote:
> 
> On the branch that the pthread wq pull request comes from, libdispatch builds on Ubuntu 14 and tests run. 
> 
> So, no more problems lurking behind that one.
> 
> --dave
> 
> <graycol.gif>Pierre Habouzit ---01/13/2016 02:53:53 PM---it needs pthread wq changes that are still in review (the pull request is tagged as such). -Pierre
> 
> From: Pierre Habouzit <phabouzit at apple.com>
> To: Philippe Hausler <phausler at apple.com>
> Cc: David P Grove/Watson/IBM at IBMUS, Swift Core Libs <swift-corelibs-dev at swift.org>
> Date: 01/13/2016 02:53 PM
> Subject: Re: [swift-corelibs-dev] libdispatch prep for integration to the rest of swift-corelibs
> Sent by: phabouzit at apple.com
> 
> 
> 
> 
> it needs pthread wq changes that are still in review (the pull request is tagged as such).
> 
> -Pierre 
> On Jan 13, 2016, at 11:11 AM, Philippe Hausler via swift-corelibs-dev <swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>> wrote:
> 
> Splitting this off to it’s own thread since this is not per-se networking related
> On Jan 13, 2016, at 11:07 AM, David P Grove <groved at us.ibm.com <mailto:groved at us.ibm.com>> wrote:
> phausler at apple.com <mailto:phausler at apple.com> wrote on 01/13/2016 01:43:17 PM:
> > 
> > Getting GCD up and rolling is definitely a bottleneck for a few 
> > things (not just NSURLSession). 
> 
> Thanks Philippe!  I was looking for things to do :)
> 
> > 
> > There are a few things that we need as checkpoints:
> > A set of build instructions tailored for the swift project
> > GCD needs to be able to build on Ubuntu 14 as well as Ubuntu 15
> 
> I can take a look at Ubuntu 14.  I know that one of the issues was the old version of libpthread_workqueue (under discussion for other reasons; we need fixes that aren't in the Ubuntu 15 version).  I'll see if there is anything else standing in the way for Ubuntu 14.
> 
> 
> I am getting a build failure on 14:
> 
> /bin/bash ../libtool --tag=CC --mode=compile clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -I../private -I../os -DDISPATCH_USE_DTRACE=0 -Wall -fvisibility=hidden -momit-leaf-frame-pointer  -I/usr/include/kqueue -isystem /usr/include/bsd -DLIBBSD_OVERLAY -fblocks -g -O2 -c -o queue.lo queue.c
> libtool: compile: clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -I../private -I../os -DDISPATCH_USE_DTRACE=0 -Wall -fvisibility=hidden -momit-leaf-frame-pointer -I/usr/include/kqueue -isystem /usr/include/bsd -DLIBBSD_OVERLAY -fblocks -g -O2 -c queue.c -fPIC -DPIC -o .libs/queue.o
> queue.c:216:22: error: use of undeclared identifier 'WORKQ_BG_PRIOQUEUE'
> .dgq_wq_priority = WORKQ_BG_PRIOQUEUE,
> ^
> queue.c:227:22: error: use of undeclared identifier 'WORKQ_BG_PRIOQUEUE'
> .dgq_wq_priority = WORKQ_BG_PRIOQUEUE,
> ^
> queue.c:928:18: error: invalid application of 'sizeof' to an incomplete type 'struct dispatch_root_queue_context_s []'
> 
> > We need to move Availability.h and friends down underneath both GCD 
> > and Foundation since they both use them
> > We need to move the blocks runtime out of Foundation and underneath 
> > or inside of GCD.
> > The master build script in swift/utils/build-script needs to be able
> > to build GCD
> > The master build script in swift/utils/build-script to ensure GCD 
> > and all required components are built before Foundation and the 
> > appropriate linker paths are passed to Foundation (see how XCTest is handled)
> > 
> 
> --dave
> 
> 
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev <https://lists.swift.org/mailman/listinfo/swift-corelibs-dev>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20160113/e44e2ba5/attachment.html>


More information about the swift-corelibs-dev mailing list