Commit Graph

6 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
8dbac56f82 [unittests] Fix compilation of Runtime unittests (#84235)
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`.
2025-09-12 15:07:23 -07:00
Mike Ash
fe7e13bba5 [Runtime][IRGen] Sign type context descriptor pointers.
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
2023-07-07 18:10:35 -04:00
Evan Wilde
aa34d98e26 Update tests to use macro section names
Automatically update the section names in the runtime and concurrency
runtime tests.
2023-02-16 10:25:43 -08:00
Doug Gregor
3c892a153c Update runtime compatibility hooks to version 5.8 2022-07-05 10:07:52 -07:00
Mishal Shah
e600e5c558 Update the unit test with runtime swift version hook 2021-10-05 18:08:08 -07:00
Mike Ash
6aab257c33 [Concurrency] Add compatibility overrides to Concurrency library.
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
2021-03-22 11:09:06 -04:00