always @preconcurrency import Glibc/Musl/Android/Bionic/WASILibc (#3153)

### Motivation:

The non-`Darwin` libcs don't have the correct concurrency annotations.
But due to these Swift bugs, it's important that the _first_ importer
uses `@preconcurrency`:

- https://github.com/swiftlang/swift/issues/79414
- https://github.com/swiftlang/swift/issues/77866

### Modifications:

Much like the Foundation (& corelibs) PRs such as
https://github.com/swiftlang/swift-foundation/pull/1175 , use
`@preconcurrency import` for the non-`Darwin` libcs.

### Result:

Fewer bad warnings/errors in user code.
This commit is contained in:
Johannes Weiss authored and GitHub committed 2025-03-21 15:35:05 +00:00
1 parent 6b00972ad9
commit 40ee44c6b9
30 files changed
+102 -102

No files matched your search

+3 -3
View File
@@ -20,11 +20,11 @@ import SystemPackage
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
@preconcurrency import Glibc
#elseif canImport(Musl)
import Musl
@preconcurrency import Musl
#elseif canImport(Bionic)
import Bionic
@preconcurrency import Bionic
#endif
/// A file system which interacts with the local system. The file system uses a thread pool to