Commit Graph

26 Commits

Author SHA1 Message Date
Ian Anderson
15345ef2d5 [CMake][Darwin] Remove support for building the SDK overlays on Apple platforms
The SDK overlays have been provided in the Apple SDKs for many years, and the interface and implementation has diverged in more recent years such that trying to build the Swift version no longer works. Remove all of the dead code.

rdar://151889154
2025-05-23 23:38:08 -07:00
Guillaume Lessard
ab117c997d [concurrency] declare POSIXErrorCode as Sendable 2024-07-05 13:34:26 -07:00
Artem Chikin
1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00
Matt Jacobson
2febbb4aaf stdlib: implement POSIXErrorCode for FreeBSD
It shares many of the same values as OpenBSD (which both inherited from 4.4BSD),
and we wouldn't expect those to diverge due to the respective platforms'
bincompat goals.
2023-03-16 01:20:56 -04:00
swift-ci
a77f161ec9 Merge pull request #38341 from 3405691582/FoundationInterop 2021-12-12 18:41:01 -08:00
Max Desiatov
f34e321444 WebAssembly: add WASI cases to POSIXErrorCode enum (#39482)
These new cases match WASI-libc declarations at https://github.com/WebAssembly/wasi-libc/blob/ad513341/libc-bottom-half/headers/public/wasi/api.h#L106
2021-09-28 19:26:25 +01:00
3405691582
ac9640b00a [stdlib] Changes to support Foundation on OpenBSD.
* Not implementing POSIXError for a given platform is not a blocking
  problem to getting a successful build of Swift. However, it is
  part of the validation tests (albeit locked behind REQUIRES) and is
  referenced when building Foundation. Implement by forklifting from
  `sys/errno.h`.

* Some Foundation class implementations require some missing includes in
  the platform modulemap. Add these.
2021-07-09 18:55:51 -04:00
Kuba (Brecka) Mracek
d7dfa3e942 Bring up tests + validation tests for the 'freestanding' build and the standalone_minimal preset (#34386) 2020-10-26 16:32:36 -07:00
Varun Gandhi
cacfb01f97 Revert subset of "[Gardening] Clean Up OS-Test Patterns Across The Codebase"
Removes usage of #canImport(Darwin) from stdlib/public.

This reverts a subset of commit cddf73ecdb.
2020-07-01 15:47:18 -07:00
Robert Widmann
cddf73ecdb [Gardening] Clean Up OS-Test Patterns Across The Codebase
Clean up a few general patterns that are now obviated by canImport

This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.
2020-06-30 22:55:58 -07:00
Alsey Coleman Miller
1f15c87f35 Added missing Linux POSIX errors 2019-05-15 14:03:11 -05:00
Alsey Coleman Miller
371b7ca764 Added POSIXErrorCode for Windows
https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-doserrno-sy
s-errlist-and-sys-nerr
2019-04-16 01:59:04 -05:00
Jordan Rose
05293f26b6 [stdlib] Remove '@_frozen' from enums that shouldn't be frozen
Error codes, FloatingPointRoundingRule, Mirror.AncestorRepresentation,
Mirror.DisplayStyle, and PlaygroundQuickLook.
2018-03-20 14:50:40 -07:00
Jordan Rose
9034ba617b Ban @_fixed_layout on enums in favor of @_frozen
In theory there could be a "fixed-layout" enum that's not exhaustive
but promises not to add any more cases with payloads, but we don't
need that distinction today.

(Note that @objc enums are still "fixed-layout" in the actual sense of
"having a compile-time known layout". There's just no special way to
spell that.)
2018-03-20 14:49:10 -07:00
Sho Ikeda
e5223e4826 [stdlib/public][gardening] Prefer os(macOS) over os(OSX) 2018-03-09 09:10:35 +09:00
Max Moiseev
5650f80937 [stdlib] Annotate types with @_fixed_layout
This will allows us to build the standard library in resilient mode by
default, hopefully, without performance regression.

<rdar://problem/36362648>
2018-01-09 14:46:30 -08:00
Robert Widmann
cde11ae1ee Resolve comments from last code review 2017-01-10 10:45:18 -07:00
Alsey Coleman Miller
8157194e83 [stdlib] Added POSIXErrorCode for Linux 2017-01-10 10:40:00 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
5bc293cc09 [gardening] Add missing licensing headers. 2016-11-28 21:40:06 +01:00
Doug Gregor
d3f077e46d [SE-0112] Teach POSIXError to store the underlying NSError.
The error code is now specified by POSIXErrorCode.
2016-07-12 10:53:52 -07:00
swift-ci
fe13e6c0e3 Merge pull request #2905 from frootloops/int32 2016-07-01 19:10:12 -07:00
Max Moiseev
38be253c30 Moving the doc comments on the line above the declaration.
This fixes the documentation displayed in XCode.
2016-06-24 18:31:15 -07:00
Arsen Gasparyan
2c634e7fca Change all uses of 'CInt' to 'Int32' in the SDK overlay 2016-06-05 20:52:23 +03:00
danra
37024e6ea0 Cosmetic fixes (NFC)
- Add newlines where missing to match sys/errno.h error groups separation
- Prefer single-line comments to C-style comments
- Align most comments to same column
- Add comment following #endif at EOF to show what it ends
- Remove extraneous whitespace
2016-04-02 17:14:28 +03:00
rintaro ishizaki
d875a56a75 [stdlib] Moved stdlib/public/SDK/Darwin to stdlib/public/Platform. NFC 2016-03-22 16:05:51 +09:00