Commit Graph

7 Commits

Author SHA1 Message Date
Philippe Hausler
029e296b34 Allow Identifiable and correct ObjectIdentifier for embedded variants (#68597) 2023-09-19 13:25:32 -07:00
Kuba Mracek
ae2e903574 [embedded] Build an initial embedded Swift standard library
This isn't a "complete" port of the standard library for embedded Swift, but
something that should serve as a starting point for further iterations on the
stdlib.

- General CMake logic for building a library as ".swiftmodule only" (ONLY_SWIFTMODULE).
- CMake logic in stdlib/public/core/CMakeLists.txt to start building the embedded stdlib for a handful of hardcoded target triples.
- Lots of annotations throughout the standard library to make types, functions, protocols unavailable in embedded Swift (@_unavailableInEmbedded).
- Mainly this is about stdlib functionality that relies on existentials, type erasure, metatypes, reflection, string interpolations.
- We rely on function body removal of unavailable functions to eliminate the actual problematic SIL code (existentials).
- Many .swift files are not included in the compilation of embedded stdlib at all, to simplify the scope of the annotations.
- EmbeddedStubs.swift is used to stub out (as unavailable and fatalError'd) the missing functionality.
2023-09-16 12:38:46 -07:00
Karoy Lorentey
7a7ebd8970 [stdlib] Adopt primary associated types in the stdlib 2022-05-09 18:06:17 -07:00
Karoy Lorentey
8ed81ae063 [stdlib] Adopt availability macros 2021-10-31 15:00:58 -07:00
Alex Martini
9fa3121181 Avoid 'e.g.' per Apple Style. 2021-09-22 16:51:45 -07:00
Kyle Macomber
6b14c2a746 [Docs] Clarifies Identifiable requirements (#31472)
[SR-12528](https://bugs.swift.org/browse/SR-12528)
rdar://62201744
2020-05-02 13:04:20 -07:00
Matthew Johnson
0a8f154ab2 Add Identifiable protocol to the standard library 2019-07-09 14:17:20 -05:00