commit | eaa77e9fc3e43ca0b7d9f097b277fd61fd89f7eb | [log] [tgz] |
---|---|---|
author | Johannes Weiß <johannesweiss@apple.com> | Mon Feb 06 17:30:25 2017 +0000 |
committer | Johannes Weiß <johannesweiss@apple.com> | Mon Feb 06 18:09:50 2017 +0000 |
tree | 3d823d1c95829840506d18ae504609585c65ecd2 | |
parent | 10eb0e41cf3674d961e29f9ff1603d57261ffe34 [diff] |
fix libdispatch.a The static version (`libdispatch.a`) that can be compiled using `./configure --enable static=yes` was missing all the Swift overlay symbols (everything in `swift_overlay.o`). The reason for that is that the linker is invoked through libtool which wants `.lo` files but the Swift overlay got passed as a `.o` file. This first of all leads to this warning: *** Warning: Linking the shared library libdispatch.la against the non-libtool *** objects [...]/swift_overlay.o is not portable! And the result is that libtool doesn't include `swift_overlay.o` when putting together the static library `libdispatch.a`. This patch fixes this problem is a pretty crude way. The real problem is that libtool doesn't understand Swift. So it can't be used when compiling `swift_overlay.o`. In order to still get a `.lo` file this patch tricks libtool into generating one from the `swift_overlay.o` generated by `swiftc`. It's very hacky but I'm not sure what else to do.
Grand Central Dispatch (GCD or libdispatch) provides comprehensive support for concurrent code execution on multicore hardware.
libdispatch is currently available on all Darwin platforms. This project aims to make a modern version of libdispatch available on all other Swift platforms. To do this, we will implement as much of the portable subset of the API as possible, using the existing open source C implementation.
libdispatch on Darwin is a combination of logic in the xnu
kernel alongside the user-space Library. The kernel has the most information available to balance workload across the entire system. As a first step, however, we believe it is useful to bring up the basic functionality of the library using user-space pthread primitives on Linux. Eventually, a Linux kernel module could be developed to support more informed thread scheduling.
We are currently early in the development of this project. We began with a mirror of the open source drop that corresponds with OS X El Capitan (10.11) and have ported it to x86_64 Ubuntu 14.04 and 15.10. The next steps are:
For detailed instructions on building and installing libdispatch, see INSTALL.md
For detailed instructions on testing libdispatch, see TESTING.md