By running this script, we can expand comments of the form
```
/*System 0.0.1*/
```
Into either a longer comment that includes the associated OS versions numbers,
```
/*System 0.0.1, @available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *)*/
```
or, when the `--attribute` option is used, into an actual `@available` attribute:
```
/*System 0.0.1*/@available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *)
```
The script can be run repeatedly to switch between these two forms, as needed.
Availability annotations now follow a rigid syntax that mentions the swift-system version that introduced the entry point:
```
/*System 0.0.2, @available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)*/
public func greeting() -> String {
"Hello"
}
```
This is designed to be processed by automated source generation tools.
CSystem is a leaky library dependency from System and must be
distributed. Install the files and make the dependency public so that
it is emitted into the clients.
Update cmake setup so that the library can be used by SwiftPM cmake build
Motivation: integrate with SwiftPM
changes:
* rename the top level project to SwiftSystem instead of swift-system to align with other projects
* rename System to SystemPackage to align with SwifPM setup
* update architectures to include arm64
* Update cmake/modules/SwiftSystemConfig.cmake.in
* Update cmake/modules/SwiftSupport.cmake
- Adds a `directory` OpenOptions as a type-safe version of O_DIRECTORY.
Allows clients to only open a FileDescriptor for FilePaths that refer
to directories.
Un-deprecate withCString, but make sure it's not available on Windows (because
the types will not match). withPlatformString is still the preferred
expression of this and favors more portable code.
When building on Windows, we rely on the `withPlatformString` to convert
the strings to the native platform encoding (UTF-16). The public
`FilePath.withPlatformString` is marked as `@_alwaysEmitIntoClient` and
references the `_withPlatformString` which is marked as `internal`.
Annotate the function as `@usableFromInline` to enable the inlined
method to reference this function.