Commit Graph

32 Commits

Author SHA1 Message Date
Alastair Houghton
0813e95569 Merge pull request #81440 from al45tair/currentos-availability
[Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
2025-07-07 12:04:00 +01:00
Ian Anderson
83577a7d66 [6.2][embedded][overlay] _Builtin_float and Synchronization cannot be imported in embedded Swift mode
The _Builtin_float and Synchronization modules are getting the SDK_NAME encoded in their embedded modules, preventing them from being used outside of macOS in embedded mode.

rdar://152665402
2025-06-09 14:04:52 -07:00
Eric Miotto
06a2001708 CMake: add explicit dependency to _Builtin_float to targets...
... that would import that as a result of importing Darwin from the SDK.

Amend my previous change to Differentiation and Distributed in this
sense.

Addresses rdar://150400049

(cherry picked from commit 8c7e8550aa)
2025-05-05 13:48:55 -07:00
Eric Miotto
62f391e32e 6.2: Add _Builtin_float dependency to Distributed and Synchronization
This will avoid errors in CI when the latter ones are scheduled before
the former.

Addresses rdar://149558141

(cherry picked from commit 231a9d989d)
2025-04-29 08:24:14 -07:00
Kuba Mracek
6d71f45101 [embedded] Stop using -D__APPLE__ and -D__MACH__ 2025-03-31 15:07:11 -07:00
Doug Gregor
1efb994375 Enable strict memory safety in the Synchronization module 2025-02-26 14:28:28 -08:00
Meghana Gupta
02a58738a0 Remove -enable-ossa-module for Synchronization and Distributed
These modules import Darwin which is not in ossa. -enable-ossa-modules
results in a one-time recompilation of dependencies when they are not in ossa.
This is not compatible with Explicit Build Modules when the original invocation
did not have -enable-ossa-modules.
2024-10-31 10:55:35 -07:00
Evan Wilde
cae88d3344 Fix add_swift_target_library for the static SDK
add_swift_target_library was missing pieces for passing sources and
flags to the static SDK build. As a result, the static SDK was missing
pieces (specifically Mutex).

Also adding the Musl import to the Linux Mutex implementation.
2024-08-13 15:59:31 -07:00
Carl Peto
3689427834 [AVR] standard library support for AVR
- when compiling embedded cross compile target standard libraries, include AVR
- add 16-bit pointer as a conditional compilation condition and get the void pointer size right for gyb sources
- attempt to fix clang importer not importing __swift_intptr_t correctly on 16 bit platforms
- changed the unit test target to avr-none-none-elf to match the cmake build

[AVR] got the standard library compiling in a somewhat restricted form:

General
- updated the Embedded Runtime
- tweaked CTypes.swift to fix clang import on 16 bit platforms

Strings
- as discussed in https://forums.swift.org/t/stringguts-stringobject-internals-how-to-layout-on-16-bit-platforms/73130, I went for just using the same basic layout in 16 bit as 32 bit but with 16 bit pointers/ints... the conversation is ongoing, I think something more efficient is possible but at least this compiles and will probably work (inefficiently)

Unicode
- the huge arrays of unicode stuff in UnicodeStubs would not compile, so I skipped it for AVR for now.

Synchronization
- disabled building the Synchronization library on AVR for now. It's arguable if it adds value on this platform anyway.
2024-07-16 12:28:27 +01:00
Kuba Mracek
6eeef12849 [embedded] Add a embedded-libraries CMake target to simplify the test dependencies 2024-06-23 13:08:01 -07:00
Alejandro Alonso
49e8a73027 Adjust Synchronization module dependencies for macCatalyst 2024-06-12 23:55:51 -07:00
Alejandro Alonso
4f8181dde6 Merge pull request #74143 from Azoy/mutex-minimal-thing
[stdlib] Condition Mutex.swift on platform
2024-06-06 07:54:36 -07:00
Alex Lorenz
74d2a66a27 [androd] Fix Synchronization Android build
Add Android import for Mutex implementation
2024-06-05 16:58:05 -07:00
Alejandro Alonso
fcfbf068a5 Add a special file for mutex on unavailable platforms 2024-06-05 13:51:55 -07:00
Alejandro Alonso
bc0e6ab392 Conditionalize Mutex.swift 2024-06-05 09:20:59 -07:00
Alejandro Alonso
cb3fc4b451 Adopt sending and movesAsLike 2024-06-04 09:49:21 -07:00
Alejandro Alonso
6b29e779e4 Support visionOS for Mutex 2024-06-04 09:06:37 -07:00
Alejandro Alonso
3a115fc290 Properly handle the syscalls on Linux and do some spins
fix some stuff
2024-06-04 09:06:37 -07:00
Alejandro Alonso
6d6e518c38 It is WASI, not WASM 2024-06-04 09:06:37 -07:00
Alejandro Alonso
97072e5b79 Adopt transferring for Mutex init 2024-06-04 09:06:37 -07:00
Alejandro Alonso
ba1787c1d5 Move atomic sources into a folder 2024-06-04 09:06:37 -07:00
Alejandro Alonso
89748d4229 Actually implement the API now 2024-06-04 09:06:36 -07:00
Alejandro Alonso
5b7e3d8ca2 Add a WasmMutex 2024-06-04 09:06:36 -07:00
Alejandro Alonso
882568ca4d Directly call gettid syscall instead of library function 2024-06-04 09:06:36 -07:00
Alejandro Alonso
2a60c88457 Implement Mutex in Synchronization 2024-06-04 09:06:34 -07:00
Kuba Mracek
48b8228acd [embedded] Start building Synchronization in embedded Swift mode 2024-03-13 10:07:37 -07:00
Eric Miotto
28e2f079b5 CMake: on Darwin be explicit about inclusion in the dyld shared cache (#70856)
This entails passing a linker flags to Apple linkers when the standard
library is not meant for inclusion in such cache.

For this to have effect on every library, propagate link flags when
building _Concurrency and Observation.

This is needed for Apple internal configurations.

Addresses rdar://120653968
2024-01-29 09:42:38 -08:00
Alejandro Alonso
d8604601d7 Rename AtomicValue to AtomicRepresentable 2024-01-03 13:27:47 -05:00
Alejandro Alonso
db9b8839a2 Add @_staticExclusiveOnly to Atomic 2023-12-18 14:01:16 -05:00
Alejandro Alonso
2c0b473b8d Add Synchronization module 2023-12-18 14:01:16 -05:00
Alejandro Alonso
6d6e55a931 Apply feedback from pitch 2023-12-18 14:01:15 -05:00
Alejandro Alonso
f747162084 Implement the Atomic type 2023-12-18 14:01:15 -05:00