PR#78516 performed a rename from `swiftRuntime` to `swiftRuntimeCore`
but might have skipped these two instances because the code is rarely
compiled in Darwin platforms (and it is not compiled in Linux/Windows
platforms either). The code on the runtime unittests seems to be
associated with the SDK overlays being built (either static or dynamic),
which none are for Darwin platforms by default. Other platforms should
build the dynamic SDK overlay, but the file is surrounded with checks
for `__APPLE__` and `__MACH__`.
The normal CI would never hit this file, but someone might while
building the static or dynamic SDK overlay if they so request it to the
`build-script`.
Ensure that context descriptor pointers are signed in the runtime by putting the ptrauth_struct attribute on the types.
We use the new __builtin_ptrauth_struct_key/disc to conditionally apply ptrauth_struct to TrailingObjects based on the signing of the base type, so that pointers to TrailingObjects get signed when used with a context descriptor pointer.
We add new runtime entrypoints that take signed pointers where appropriate, and have the compiler emit calls to the new entrypoints when targeting a sufficiently new OS.
rdar://111480914
Take the existing CompatibilityOverride mechanism and generalize it so it can be used in both the runtime and Concurrency libraries. The mechanism is preprocessor-heavy, so this requires some tricks. Use the SWIFT_TARGET_LIBRARY_NAME define to distinguish the libraries, and use a different .def file and mach-o section name accordingly.
We want the global/main executor functions to be a little more flexible. Instead of using the override mechanism, we expose function pointers that can be set by the compatibility library, or by any other code that wants to use a custom implementation.
rdar://73726764