This patch makes the build system to copy the lnk files for each
stdlib targets if needed instead of only for the Linux target.
This is the take 2 of the patch. The first one was reverted in
7aa4a8de06
This patch makes the build system to copy the lnk files for each
stdlib targets if needed instead of only for the Linux target.
Co-authored-by: Max Desiatov <m_desiatov@apple.com>
On Darwin, `RTLD_NEXT` doesn't do what we need it to here, with the
result that if `libswiftCore`'s TSan initializer gets found first,
then `libswift_Concurrency` won't have its initializer called at all,
in spite of us using `RTLD_NEXT` to find the next definition.
Fix this by centralising the initializer in `libswiftCore` instead.
rdar://110665213
Section scans (for metadata, protocols, etc.) can be costly. This change adds tracing calls to those scans so we can more easily see how much time is spent in these scans and where they're initiated.
This adds an os_signpost implementation controlled by SWIFT_STDLIB_TRACING, and a default empty implementation for when that's disabled.
rdar://110266743
We have two stacks that we set up during crash handling, both of
which were potentially misaligned. This only tripped us up on
Ubuntu 20.04 on aarch64 - my guess is that maybe `clone()` aligns
the stack pointer on newer kernels which is why we didn't see it
on 22.04.
rdar://110743884
These seem to be related to signal handling issues in threads that
have been started presumably by the C library or some other library.
Primarily this appears to affect Ubuntu 20.04 on aarch64, though I
have seen sporadic issues on 18.04 as well.
We address the problem by making the thread suspension mechanism
more robust in the face of threads with masked signals.
rdar://110653167
ReflectionContext::allocationMetadataPointer() was reading the
metadata pointer from a wrong offset because of the out-of-sync struct
layouts and dump-generic-metadata was not working correctly.
This change resync's the layouts and adds a static_assert to verify
that the offsets match between GenericMetadataCacheEntry and
GenericCacheEntry.
`__cxa_demangle()` is a rather unusual API; one of its "features" is that
the pointer you pass in must either be `nullptr`, in which case it
will call `malloc()` itself, _or_ it has to be a pointer to a block
of memory allocated with `malloc()`, because `__cxa_demangle()` may
`realloc()` it for you.
This seems to me to be something of a non-obvious footgun, so we never
pass the caller's pointer through to `__cxa_demangle()`, which lets them
decide how they want to allocate space.
rdar://110261712
The `status` argument to the `_swift_backtrace_demangle()` function
isn't especially useful, won't match behaviour on Windows, and we
actually don't use it in the Swift code that calls this SPI.
Remove it.
rdar://110261712
* [IRGen] Implement support for multi payload enums in layout strings
rdar://105837114
* Implement multi payload enum cases in swift_resolve_resilientAccessors
* Add missing const