Skip to content

1121 #450

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

Closed
wants to merge 176 commits into from
Closed

1121 #450

wants to merge 176 commits into from

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Mar 4, 2019

No description provided.

das and others added 30 commits December 6, 2018 14:39
…th-autoconf

CMake: carry over some nuances from autotools test config

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
Enable additional compiler warnings for CMake build

Signed-off-by: Daniel A. Steffen <[email protected]>
Signed-off-by: Daniel A. Steffen <[email protected]>
Signed-off-by: Daniel A. Steffen <[email protected]>
Signed-off-by: Daniel A. Steffen <[email protected]>
Signed-off-by: Daniel A. Steffen <[email protected]>
…3.1.4-merge-master

Merge darwin/libdispatch-913.1.4 to master

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
build: add support to build with sanitization

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
linux: update header used for `major` macro

Signed-off-by: Daniel A. Steffen <[email protected]>
Fix building on armv6

Signed-off-by: Daniel A. Steffen <[email protected]>
This fixes issues around resuming or re-registering file-descriptors with
a previously triggered EPOLLONESHOT event.

Signed-off-by: Pierre Habouzit <[email protected]>
Fixes: SR-5759
Signed-off-by: Daniel A. Steffen <[email protected]>
Track armed events in muxnotes closely

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
SR-4677: avoid SIGSEGV if _dispatch_muxnote_create returns NULL

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
build: fix symlink creation

Signed-off-by: Daniel A. Steffen <[email protected]>
rdar://problem/34132958

Signed-off-by: Daniel A. Steffen <[email protected]>
Synchronize the Linux and Darwin overlay versions of Time.swift

Signed-off-by: Daniel A. Steffen <[email protected]>
…val.

rdar://problem/34440944

Signed-off-by: Daniel A. Steffen <[email protected]>
…rflows

Fix overflow traps in DispatchTime/DispatchWallTime/DispatchTimeInterval

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
Properly pick up new events when reusing a muxnote

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
docs: update documentation to show how to use CMake

Signed-off-by: Daniel A. Steffen <[email protected]>
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 <[email protected]>
Attempt to be better with signed conversions

Signed-off-by: Daniel A. Steffen <[email protected]>
ktopley-apple and others added 21 commits December 6, 2018 14:51
…rdar40775762

Change the signature for DispatchData.enumerateBytes() to match that …

Signed-off-by: Kim Topley <[email protected]>
rdar://problem/40951342
Signed-off-by: Kim Topley <[email protected]>
…rdar40951342

Add documentation comments.

Signed-off-by: Kim Topley <[email protected]>
CMakeLists.txt checks for librt's presence but the result is never used. This
causes a link failure on systems where clock_gettime() is provided by librt.

Signed-off-by: Kim Topley <[email protected]>
build: link against librt if it's available
Signed-off-by: Kim Topley <[email protected]>
generic_unix_stubs.c seems to no longer be necessary. generic_unix_stubs.h still
had some required definitions in it, so move those into shims.h and a new
shims/mach.h. This also lets us remove some duplicated definitions in the
Windows shims.

Signed-off-by: Kim Topley <[email protected]>
Remove generic_unix_stubs

Signed-off-by: Kim Topley <[email protected]>
When building debug, swift requires a supplementary library.  The swift driver
is aware of this and will make the appropriate arrangements.  However, since the
swift component is compacted into the C library, the linker driver being used
does not understand this requirement.  Explicitly link against the support
library.  This allows building the debug configuration of libdispatch with a
release configuration of the swift standard library.

Signed-off-by: Kim Topley <[email protected]>
build: link against swiftOnoneSupport in debug configuration
Signed-off-by: Kim Topley <[email protected]>
Allow libdispatch to be embedded in other CMake projects using
add_subdirectory(). This essentially means that `CMAKE_SOURCE_DIR` and
`CMAKE_BINARY_DIR` cannot be used directly. Use the versions of these variables
which are scoped to the current project or directory.

Signed-off-by: Kim Topley <[email protected]>
build: support embedding in other CMake projects
Signed-off-by: Kim Topley <[email protected]>
This hack was only needed for Swift 3 mode in a narrow case.  Now that
we're dropping Swift 3 from master, the source break this was working
around is no longer relevant.

Signed-off-by: Kim Topley <[email protected]>
…ifferences

Drop @_downgrade_exhaustivity_check attribute

Signed-off-by: Kim Topley <[email protected]>
Remove version number used in 'available' attribute for non-specific platform '*'.

Signed-off-by: Kim Topley <[email protected]>
Fix redundant access-level modifiers.

Signed-off-by: Kim Topley <[email protected]>
Signed-off-by: Kim Topley <[email protected]>
@compnerd compnerd force-pushed the 1121 branch 2 times, most recently from 33aaf78 to 606cd45 Compare March 5, 2019 01:58
Make the 1121 release build on Windows.  This is sufficient for getting
a basic Hello World dispatch program to run under swift again.
@ktopley-apple
Copy link
Contributor

@compnerd I merged the changes for libdispatch-1121 into master. I will help as required to get this and the other outstanding change for the Windows port included.

@compnerd
Copy link
Member Author

@ktopley-apple - awesome! Thanks! I'm going to abandon this change, as #453 will cover all of this and more. I will test that out and let you know once that is ready, but, I have rebased it for the current tree.

@compnerd compnerd closed this Mar 19, 2019
@compnerd compnerd deleted the 1121 branch March 19, 2019 01:01
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.