Commit Graph

265 Commits

Author SHA1 Message Date
Mishal Shah
b3e7c68bcd Update Runtimes/Supplemental/StringProcessing/CMakeLists.txt to 6.2.1 2025-08-27 14:39:24 -07:00
Mishal Shah
4e8f952ff5 Update Runtimes/Overlay/CMakeLists.txt to 6.2.1 2025-08-27 14:39:13 -07:00
Mishal Shah
e30e85385b Update Runtimes/Core/CMakeLists.txt to 6.2.1 2025-08-27 14:38:57 -07:00
Mishal Shah
95fefa36e1 Update the runtime version to 6.2
(cherry picked from commit 9231f97885)
2025-08-26 23:40:03 -07:00
Mishal Shah
70616b4dea Update the runtime version to 6.2.0 for Overlay and Supplemental
(cherry picked from commit 9f6a789374)
2025-08-26 23:40:03 -07:00
Guillaume Lessard
a345e3a8b3 Merge pull request #83000 from glessard/rdar147780495-OutputSpan-updates-62
[SE-0485, 6.2] OutputSpan and OutputRawSpan
2025-07-17 19:12:58 -07:00
Yuta Saito
e6453a34a0 [Concurrency] Fix runtime isolated-conformance checks with static stdlib
Most of linkers pull object files from static archives only if any
symbol from that object file is referenced, even if the object contains
a ctor code. `Setup.cpp` didn't have any symbols referenced from
other code, so it was not linked in when the concurrency runtime was
linked in statically. This commit moves the ctor code to `Task.cpp`
to ensure that it is always linked in.
2025-07-16 23:50:31 +00:00
Guillaume Lessard
ba1446e5f9 [stdlib] list files for cmake 2025-07-11 19:03:02 -07:00
Evan Wilde
07bb587ead Move availability args to response file
The availability flags keep increasing the number of characters on the
command line overflowing the maximum character length on Windows and
making the commands harder to read. This patch moves the generated
arguments into a separate response file so that they can continue to
grow without running into argument length limitations.
2025-07-08 16:04:53 +01:00
Alastair Houghton
8eb879831c Merge pull request #81940 from al45tair/eng/PR-152498657
Rename SwiftStdlibCurrentOS to StdlibDeploymentTarget.
2025-07-07 12:04:38 +01:00
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
Alastair Houghton
2323449a00 Merge pull request #82526 from al45tair/eng/PR-153531418-6.2
[Concurrency] Rename Dummy(Main|Task)Executor.
2025-07-03 15:07:34 +01:00
Doug Gregor
7d10f95f6a Merge pull request #82662 from DougGregor/back-deploy-main-actor-isolated-deinit-6.2
[6.2] [SE-0371] Back-deploy support for main-actor-isolated deinit
2025-07-02 00:13:47 -07:00
Doug Gregor
42e1610607 Switch to the appropriate C calling convention for pthread_main_np 2025-07-01 08:15:04 -07:00
Saleem Abdulrasool
0a34a1e2b0 Runtimes: avoid ODR violations in _Concurrency
When building the standard libraries with the LLVM ADT types, we use the
local definition which have been modified to avoid ODR violations.
However, due to the intermingling of the compiler and runtime
implementations, we cannot isolate the headers properly to ensure that
the right definition is used. We need to ensure that we pass along
`SWIFT_RUNTIME` when processing headers to avoid references to the
unsafe references to the LLVM Support library.
2025-06-27 14:08:58 -07:00
Saleem Abdulrasool
8a30f3a12d Runtimes: adjust the linking to _Concurrency
`_Concurrency` is being implicitly imported and then linked into the
runtime. Disable the implicit import of the concurrency runtime to allow
proper control over the linkage for the library.
2025-06-27 14:08:43 -07:00
Alastair Houghton
aab0e446d3 [Build][Concurrency] Update new runtime build as well.
We need to update the new runtime build with the filename change also.

rdar://153531418
2025-06-26 10:55:00 +01:00
Guillaume Lessard
63bc461aef [cmake] InoutLifetimeDependence should be enabled
Addresses rdar://152467655
2025-06-02 20:19:44 -07:00
Konrad `ktoso` Malawski
c8a8183d26 [6.2][Concurrency][SE-review update] Task names update (#81132)
**Description**: This adds "task name" parameter to all task creating
functions.

This is done in a few ways, e.g. we can backdeploy this to 5.1 in APIs
which do not accept the `TaskExecutor` but it they do we provide a
version for 6.0+ etc. This was requested in the SE acceptable of this
proposal [Acceptance post
SE-0469](https://forums.swift.org/t/accepted-with-modifications-se-0469-task-naming/79438).

This moves all these declarations to gyb since going through them one by
one has become unmaintainable otherwise.

**Scope/Impact**: All task creation APIs now gain a new task name
parameter.
**Risk:** Medium, changes existing APIs rather than adding "even more
overloads" though this risk was discussed in the team and accepted. This
has a potential to be source breaking it someone used Task.init and
friends as function.
**Testing**: CI testing, source compatibility suite testing
**Reviewed by**: 

**Original PR:** 
- https://github.com/swiftlang/swift/pull/81107 build changes required
for this
- https://github.com/swiftlang/swift/pull/80984


**Radar:**

---------

Co-authored-by: Kuba Mracek <mracek@apple.com>
2025-05-29 07:52:33 +09:00
Pavel Yaskevich
775a9bc19f Merge pull request #81488 from xedin/rename-some-task-apis-6.2
[6.2][stdlib] SE-0472: Rename Task and*TaskGroup APIs to match the proposal
2025-05-14 14:53:45 -07:00
Guillaume Lessard
2853f6241a Merge pull request #81484 from glessard/rdar151179266-flag-in-swiftinterface-6.2 2025-05-14 07:24:04 -07:00
Pavel Yaskevich
2bf00077e4 [stdlib] SE-0472: Rename Task and*TaskGroup APIs to match the proposal
`Task.startSynchronously` -> `Task.immediate`
`*TaskGroup.startTaskSynchronously{UnlessCancelled}` -> `*TaskGroup.addImmediateTask{UnlessCancelled}`

(cherry picked from commit 001eab867d)
2025-05-13 20:11:28 -07:00
Guillaume Lessard
30cd7e4fab [cmake] LifetimeDependenceMutableAccessors should be enabled 2025-05-13 11:11:11 -07:00
3405691582
7a87fa5cbc Add a platform executor module for OpenBSD.
This is basically the same as the one for Linux, but it would be
somewhat awkward to add the platform conditional on a file named for
Linux when OpenBSD is not Linux.

Important note: if Dispatch is disabled, then this will cause a
compilation error (probably not just for OpenBSD either), because
PlatformExecutorFactory is both defined in PlatformExecutorNone.swift
and PlatformExecutor<...>.swift in this case.

Because this only bites OpenBSD bootstrap builds, and since OpenBSD
support has been upstreamed to Dispatch, default to the Dispatch
implementation for now to get this in, and we'll refactor in a different
pr.
2025-05-08 17:46:30 -04:00
Michael Gottesman
e04e15f125 [swift-settings] Now that we aren't using it immediately, remove it from tree.
We can always get it back from the git history.

rdar://150695113
(cherry picked from commit 9d59dbed17)

Conflicts:
	include/swift/AST/DiagnosticsSema.def
	include/swift/Basic/Features.def
	test/abi/macOS/arm64/concurrency.swift
	test/abi/macOS/x86_64/concurrency.swift
2025-05-06 14:12:23 -07:00
Evan Wilde
62c353a7f9 [6.2]: Add platform executor module for FreeBSD
Swift concurrency defines a default platform executor. This was not
defined for FreeBSD resulting in build failures. Defining it to use the
Dispatch executor.

Scope: This only impacts FreeBSD.
Risk: Low. This change only affects FreeBSD.
Reviewers: @compnerd, @ktoso, @al45tair
Testing: Local testing to ensure Concurrency builds on FreeBSD.
Fixes: rdar://150643436

(cherry picked from commit 4a41e50730)
2025-05-04 14:05:06 -07:00
Max Desiatov
c51eaa336a Revert "Revert "Concurrency: Move code between Executor{Bridge,Impl}.cpp"" (#80692)
* Revert "Revert "Concurrency: Move code between `Executor{Bridge,Impl}.cpp`""

* Update CMakeLists.txt
2025-04-28 19:16:32 +09:00
Evan Wilde
732808147d Merge pull request #81040 from etcwilde/ewilde/6.2-runtime-fix-clobbered-memories
[🍒][SwiftCore]: Don't always clobber memory
2025-04-24 10:02:27 -07:00
Evan Wilde
be7cc109e6 [SwiftCore]: Don't always clobber memory
The new build system set `SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS` to 0.
Unfortunately, the check in the Swift runtime used `#ifdef`, so even
though it was turned off, it was actually enabled in some cases.

Fixing the issue in the build system as well as switching the check to
verify that value of `SWIFT_RUNTIME_CLOBBER_FREED_OBJECTS` is taken into
account in the sources. C/C++ implicitly defines macro values to 1 when
set without a value and 0 when it is not set.

Also making the hex a bit more recognizable and grep'able by including
it as a comment.

Fixes: rdar://149210738
(cherry picked from commit 6f39a52afc)
2025-04-23 11:18:19 -07:00
Eric Miotto
d62e385254 [SwiftCore] emit correct names for symbols that can be backdeployed
This matches the flag that was added to the old build system in
b0627e28a2

Addresses rdar://149410833
2025-04-21 15:01:47 -04:00
Slava Pestov
c905c5c335 cmake: Establish dependency on utils/availability-macros.def 2025-04-21 15:01:29 -04:00
Michael Ilseman
393c24ddd7 UTF8Span (#78531) (#80890)
Add support for UTF8Span

Also, refactor validation and grapheme breaking
2025-04-18 10:01:15 -04:00
Doug Gregor
06c0efbce6 [stdlib] Reinstate AllowUnsafeAttribute experimental feature on libraries
We need this so that older compilers can handle the .swiftinterface
files we generate. It's unnecessary for newer compilers and can be
removed later.

Fixes rdar://148529962.

(cherry picked from commit 0100104ff7)
2025-04-04 15:18:25 -07:00
Alastair Houghton
29da71761e [Concurrency] Fix new build script.
Looks like a new CMakelists.txt got added to the new build system while
I was working on this.
2025-03-31 17:10:24 +01:00
Guillaume Lessard
c9b1ab8c42 Merge pull request #79650 from glessard/rdar138440979-MutableSpan
[SE-0467] MutableSpan, with mutableSpan properties to Array, ArraySlice and ContiguousArray.
2025-03-28 17:59:47 -07:00
Evan Wilde
2a7dbd88a3 Merge pull request #80354 from etcwilde/ewilde/stdlib-enable-explicit-modules-builds
[SwiftCore] Enable explicit module builds
2025-03-28 17:35:33 -07:00
Saleem Abdulrasool
20ef4b09c5 Merge pull request #80340 from compnerd/clang
Runtimes: inject Windows SDK clang modules
2025-03-28 13:47:12 -07:00
Evan Wilde
4d892e0fe2 [CMake] Fix missing RegexParser dependency
RegexBuilder depends on RegexParser. Without the link dependency, we the
swift module isn't passed to the RegexBuilder build.
2025-03-27 20:55:16 -07:00
Guillaume Lessard
51db21acc4 [build] add files for the new build system 2025-03-27 16:55:06 -07:00
Evan Wilde
bfa5269dec [SwiftCore] Enable explicit module builds
Explicit module builds help prevent the dependency scanner from getting
lost and attempting to pull the SwiftShims module from the resource
directory, existing SDK, and the just-built standard library.
They aren't part of the library interface, but make it possible to build
the runtime libraries without seeing duplicate shims. Moving the flag to
a top-level compile command.
2025-03-27 15:20:09 -07:00
Saleem Abdulrasool
d51e1bcedf Runtimes: inject Windows SDK clang modules
When building the standard library, the SDK is not fully staged and so
the compiler would not be able to inject the VFS overlay for the
modularisation of the Windows SDK. Manually construct the mappings and
apply them.
2025-03-27 08:23:40 -07:00
Evan Wilde
bab0db68ad [CMake] Build _StringProcessing and RegexBuilder
First pass at getting the StringProcessing and RegexBuilder runtime
libraries built with pure CMake.
2025-03-26 17:37:11 -07:00
Evan Wilde
38a5fd6976 [CMake] Fix generated config install location
The expected install locations for the SwiftCoreConfig.cmake and
SwiftCoreTargets.cmake file was inconsistent between the build directory
and the install location. Making everything consistent across install
locations. In both cases, the files are installed under
`./cmake/SwiftCore`. This is one of the formats that `find_package` uses
to automatically search for package config files so that we can avoid
passing `SwiftCore_DIR` to all sub-projects.
2025-03-26 17:16:11 -07:00
Evan Wilde
d7db651b92 [CMake] Get _RegexParser building
This is a first pass at getting the _RegexParser library building.
2025-03-26 16:51:38 -07:00
Evan Wilde
aa6b5c2d37 [CMake] Copy StringProcessing files into stdlib
We want to move StringProcessing sources out of the experimental string
processing repository. Use the Resync script to copy the files from the
experimental repository into position in the StringProcessing library.
2025-03-26 16:45:23 -07:00
Saleem Abdulrasool
78ed9ad478 Runtimes: allow building the Overlay against SwiftCore
Wire up the SwiftCore project to the Overlay project. This allows us to
build against the just built SwiftCore.
2025-03-25 22:37:04 -07:00
Saleem Abdulrasool
a17cf9b785 Merge pull request #80250 from compnerd/dependencies
Runtimes: establish dependency on the registrar
2025-03-25 18:59:25 -07:00
Saleem Abdulrasool
3bb8cfb475 Merge pull request #80251 from compnerd/workaround
Runtimes: add additional interface flags
2025-03-25 13:09:50 -07:00
Saleem Abdulrasool
c2c991cc12 Merge pull request #80249 from compnerd/positional
Runtimes: always build the runtime as PIC
2025-03-25 13:09:31 -07:00
Saleem Abdulrasool
c1dbc12587 Runtimes: establish dependency on the registrar
This removes the workaround for the exporting of the registrar and
enables proper dependency tracking across projects (primarily geared
towards the Overlay).
2025-03-25 10:12:31 -07:00