-
Notifications
You must be signed in to change notification settings - Fork 471
Merge darwin/libdispatch-1121 to master #447
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
Merge darwin/libdispatch-1121 to master #447
Conversation
CMake: carry over some nuances from autotools test config Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
1. add a CMake module to define additional warning flags to enable when compiling dispatch. 2. enable the additional warning flags by default for CMake 3. match autotools behavior of not including the BSD_OVERLAY when compiling the dispatch_c99 test case. This avoids a warning about __printflike being redefined when compiling this test case with the expanded set of warning flags. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Enable additional compiler warnings for CMake build Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <das@apple.com> Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <das@apple.com> Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
…ge-master Merge darwin/libdispatch-913.1.4 to master Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Add support to configure the build to use sanitizers to aid in finding issues. The `DISPATCH_USE_SANIZITERS` is a cmake option that defaults to none, but can be one of `Address, Memory, MemoryWithOrigins, Undefined, Leaks, Address;Undefined`. This allows for easily building libdispatch and the tests with the sanitizers. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
build: add support to build with sanitization Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Newer versions of glibc indicate that they intend to move the major macro from sys/types.h to sys/sysmacros.h. Add a check for the header and include that earlier to ensure that the macro is provided by the newer header when available/possible. This avoids an unnecessary warning from the system headers. Because `config_ac.h` is not available at the right location, we cannot include the header to check whether the header is available. Rely on the compiler provided `__has_include` instead of the configure check. Adjust the inclusion of `sys/cdefs.h` accordingly. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
linux: update header used for `major` macro Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Fix building on armv6 Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
This fixes issues around resuming or re-registering file-descriptors with a previously triggered EPOLLONESHOT event. Signed-off-by: Pierre Habouzit <phabouzit@apple.com> Fixes: SR-5759 Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Track armed events in muxnotes closely Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
It is possible for _dispatch_muxnote_create to return NULL, this error condition was not being handled in dispatch_unote_register leading to an immediate SIGSEGV when it happened. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
SR-4677: avoid SIGSEGV if _dispatch_muxnote_create returns NULL Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
This adjusts the symlink creation so that it always occurs. This also allows us to ensure that we wire up the dependency for the swift module to the symlink creation. The CMake based build would fail without this when trying to build dispatch for SourceKit on Linux. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
build: fix symlink creation Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
rdar://problem/34132958 Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Synchronize the Linux and Darwin overlay versions of Time.swift Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
…val. rdar://problem/34440944 Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Fix overflow traps in DispatchTime/DispatchWallTime/DispatchTimeInterval Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Changes for SR-5759 introduced a bug where disarmed events got dropped when a muxnote is reused, due to erroneously setting dmn->dmn_events to the combination of new events and currently armed events. Combining existing events with the combination of new events and armed events implements the intended behavior. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Properly pick up new events when reusing a muxnote Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Update the documentation to reference the CMake build infrastructure rather than autotools for the non-Darwin targets. Once the Darwin build is switched over, the entire build process can be described in a single block. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
docs: update documentation to show how to use CMake Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Most targets use unsigned chars. Explicitly change the static tables to `signed char`. An alternative would be to force signed chars during the compilation of libdispatch. When building for Linux AArch64, the use of `-1` causes signed conversion warnings when initializing the table. Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Attempt to be better with signed conversions Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
Okay, seems that the |
204c38a has most of the hacks that I needed to mostly build ... the aliasing issue I think is something that needs a careful eye, and the |
720e08f
to
aac4452
Compare
@compnerd and @adierking - thanks for your comments and patches. I will update my local copy of the branch starting later today. Meanwhile I just pushed some changes that should result in the Linux build passing its tests. |
@swift-ci please test |
@ktopley-apple - if you could reply to the a couple of the unresolved comments I had, I might be able to update the patch to get those handled as well. |
I replied to three open questions. Please let me know if I missed anything :-) |
@ktopley-apple - okay, at least the aliasing issue is due to the use of |
The top most commit there (33aaf78) is sufficient to make windows x64 build. A test "hello world" program works with Swift with that. |
@swift-ci please test |
Thanks. I will be continuing this merge this week. |
|
@ktopley-apple - yeah, for 1121's build thats the patch that gets it to build; once that is in with 1121, I can bring over the cleaned up work that I did on the current master. |
@swift-ci please test |
1 similar comment
@swift-ci please test |
@ktopley-apple we are seeing this failure on 18.04, not sure if this is released to this PR.
https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-18_04-long-test/1424/console |
Note: The crash showed up in the same build this PR landed, so I think it's fairly clear this PR is what triggered it (not saying dispatch did anything wrong here, the compiler shouldn't crash!) probably via one of the changes in |
…erge-master Merge darwin/libdispatch-1121 to master Signed-off-by: Kim Topley <ktopley@apple.com>
Merge tag darwin/libdispatch-1121 on darwin/trunk.
This includes the latest Apple source drop libdispatch-1121 (up from libdispatch-913.1.4 in #447), on top of darwin/darwin-012.