Skip to content

Commit 9bc85b7

Browse files
authored
Merge branch 'main' into UTF8SpanIterators
2 parents 59b8816 + ca0491a commit 9bc85b7

File tree

3,578 files changed

+70256
-31670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,578 files changed

+70256
-31670
lines changed

.github/ISSUE_TEMPLATE/task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ body:
1818
This repository hosts the Swift compiler, the Swift standard library,
1919
the Swift runtime, SourceKit, and IDE support for the Swift language.
2020
It does *not* track feedback on Xcode and other closed source Apple
21-
deeloper software such as SwiftUI and UIKit; please direct it to
21+
developer software such as SwiftUI and UIKit; please direct it to
2222
[Feedback Assistant](https://developer.apple.com/bug-reporting)
2323
instead.
2424
- type: textarea

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ Runtimes/**/*.cpp
8989
Runtimes/**/*.c
9090
Runtimes/**/*.m
9191
Runtimes/**/*.mm
92+
Runtimes/**/*.S
93+
Runtimes/**/*.asm
9294
Runtimes/**/*.def
9395
Runtimes/**/*.gyb
9496
Runtimes/**/*.apinotes

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
> [!NOTE]
44
> This is in reverse chronological order, so newer entries are added to the top.
55
6+
## Swift (next)
7+
8+
* Concurrency-related APIs like `Task` and string-processing-related APIs like `Regex` can now be qualified by the name
9+
`Swift`, just like other standard library APIs:
10+
11+
```swift
12+
Swift.Task { ... }
13+
func match(_ regex: Swift.Regex<(Substring)>) { ... }
14+
```
15+
16+
The old `_Concurrency` and `_StringProcessing` names are still supported for backwards compatibility, and Embedded
17+
Swift projects must still explicitly `import _Concurrency` to access concurrency APIs.
18+
619
## Swift 6.2
720

821
* [SE-0472][]:

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,7 +1700,8 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
17001700
-DCMAKE_CXX_COMPILER_TARGET:STRING=${stdlib_target_triple}
17011701
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS}
17021702
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
1703-
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE)
1703+
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE
1704+
-DSwiftOverlay_ENABLE_CXX_INTEROP=TRUE)
17041705

17051706
ExternalProject_Add("${stdlib_target}-Supplemental"
17061707
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Supplemental"
@@ -1711,7 +1712,7 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
17111712
# To ensure incremental builds work as expected
17121713
BUILD_ALWAYS 1
17131714
CMAKE_ARGS
1714-
-DSwift_ENABLE_RUNTIMES=StringProcessing|Synchronization|Distributed|Observation
1715+
-DSwift_ENABLE_RUNTIMES=StringProcessing|Synchronization|Distributed|Observation|Runtime
17151716
-DBUILD_SHARED_LIBS=YES
17161717
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
17171718
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -1722,6 +1723,7 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
17221723
-DCMAKE_Swift_COMPILER_TARGET:STRING=${stdlib_target_triple}
17231724
-DCMAKE_C_COMPILER_TARGET:STRING=${stdlib_target_triple}
17241725
-DCMAKE_CXX_COMPILER_TARGET:STRING=${stdlib_target_triple}
1726+
-DCMAKE_ASM_COMPILER_TARGET:STRING=${stdlib_target_triple}
17251727
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS}
17261728
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
17271729
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE)

README.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,6 @@
55

66
# Swift Programming Language
77

8-
| **OS** | **Status** |
9-
|---:|:---:|
10-
| macOS | [![macOS Universal Build Status](https://ci.swift.org/job/oss-swift-package-macos/lastCompletedBuild/badge/icon?subject=universal)](https://ci.swift.org/job/oss-swift-package-macos)|
11-
| Ubuntu 20.04 | [![Ubuntu 20.04 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04) [![Ubuntu 20.04 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-ubuntu-20_04-aarch64)|
12-
| Ubuntu 22.04 | [![Ubuntu 22.04 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04) [![Ubuntu 22.04 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-ubuntu-22_04-aarch64)|
13-
| Ubuntu 24.04 | [![Ubuntu 24.04 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04) [![Ubuntu 24.04 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-ubuntu-24_04-aarch64)|
14-
| Amazon Linux 2 | [![Amazon Linux 2 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2) [![Amazon Linux 2 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-amazon-linux-2-aarch64)|
15-
| Debian 12 | [![Debian 12 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-debian-12/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-debian-12) [![Debian 12 aarch64 Build Status](https://ci.swift.org/job/oss-swift-package-debian-12-aarch64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci.swift.org/job/oss-swift-package-debian-12-aarch64)|
16-
| Windows 10 | [![Windows 10 x86_64 Build Status](https://ci-external.swift.org/job/swift-main-windows-toolchain/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci-external.swift.org/job/swift-main-windows-toolchain) [![Windows 10 arm64 Build Status](https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64/lastCompletedBuild/badge/icon?subject=arm64)](https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64)|
17-
| Universal Base Image 9 | [![Universal Base Image 9 x86_64 Build Status](https://ci.swift.org/job/oss-swift-package-ubi-9/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci.swift.org/job/oss-swift-package-ubi-9)|
18-
|**Cross-Compilation Targets**||
19-
| wasm32-unknown-wasi |[![wasm32-unknown-wasi Build Status](https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04)|
20-
|**Community-Hosted CI Platforms**||
21-
|[Android](https://github.com/swiftlang/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_ubuntu_24_04_android.json) | [![Android x86_64 Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build/lastCompletedBuild/badge/icon?subject=x86_64)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build) [![Android aarch64 Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/lastCompletedBuild/badge/icon?subject=aarch64)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64)|
22-
238
## Welcome to Swift
249

2510
Swift is a high-performance system programming language. It has a clean

Runtimes/Core/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@
2121

2222
# TODO:
2323
# Platform support:
24-
# - Work on/Verify cross-compiling
25-
# - Work on/Verify Windows and Linux native builds
24+
# - Work on/Verify Linux native builds
2625
# Embedded
2726
# -- -Xfrontend -emit-empty-object-file
28-
# Catalyst Support
29-
# -- Will need shadow invocations to generate swiftmodules for Swift parts
30-
# Install *.abi.json, swiftdoc, and swiftsourceinfo
3127

3228
cmake_minimum_required(VERSION 3.29)
3329
# TODO before requiring CMake 4.1 or later
@@ -176,7 +172,7 @@ add_compile_options(
176172
# a compromise, treat all linker warnings as errors.
177173
add_link_options($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
178174
# Ensure all symbols are fully resolved on Linux
179-
add_link_options($<$<PLATFORM_ID:Linux>:LINKER:-z,defs>)
175+
add_link_options($<$<PLATFORM_ID:Android,Linux>:LINKER:-z,defs>)
180176

181177
add_compile_options(
182178
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
@@ -193,7 +189,6 @@ add_compile_options(
193189
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-implicit-string-processing-module-import>"
194190
"$<$<COMPILE_LANGUAGE:Swift>:-no-link-objc-runtime>"
195191
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -enforce-exclusivity=unchecked>"
196-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -enable-ossa-modules>"
197192
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -empty-abi-descriptor>"
198193
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -target-min-inlining-version -Xfrontend min>"
199194
"$<$<AND:$<NOT:$<BOOL:${SwiftCore_ENABLE_OBJC_INTEROP}>>,$<COMPILE_LANGUAGE:Swift>>:SHELL:-Xfrontend -disable-objc-interop>"

Runtimes/Core/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ target_link_libraries(swift_Concurrency PRIVATE
136136
swiftShims
137137
swiftConcurrencyInternalShims
138138
$<$<BOOL:${BUILD_SHARED_LIBS}>:swiftThreading>
139+
$<$<PLATFORM_ID:Android>:log>
139140
$<$<PLATFORM_ID:Windows>:Synchronization>
140141
$<$<PLATFORM_ID:Windows>:mincore>
141142
# Link to the runtime that we are just building.

Runtimes/Core/LLVMSupport/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ add_library(swiftLLVMSupport OBJECT
55
SmallPtrSet.cpp
66
SmallVector.cpp
77
StringRef.cpp)
8-
target_compile_options(swiftLLVMSupport
9-
PRIVATE
10-
$<$<BOOL:${SwiftCore_HAS_ASL}>:-DSWIFT_STDLIB_HAS_ASL>)
8+
target_compile_options(swiftLLVMSupport PRIVATE
9+
$<$<BOOL:${SwiftCore_HAS_ASL}>:-DSWIFT_STDLIB_HAS_ASL>)
10+
target_link_libraries(swiftLLVMSupport PRIVATE
11+
$<$<PLATFORM_ID:Android>:log>)
1112

1213
if(NOT BUILD_SHARED_LIBS)
1314
install(TARGETS swiftLLVMSupport

Runtimes/Core/cmake/modules/CatalystSupport.cmake

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
if(SwiftCore_COMPILER_VARIANT_TARGET)
77
add_compile_options(
8-
"$<$<COMPILE_LANGUAGE:C,CXX>:SHELL:-darwin-target-variant ${SwiftCore_COMPILER_VARIANT_TARGET}>"
8+
"$<$<COMPILE_LANGUAGE:ASM,C,CXX>:SHELL:-darwin-target-variant ${SwiftCore_COMPILER_VARIANT_TARGET}>"
99
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-target-variant ${SwiftCore_COMPILER_VARIANT_TARGET}>"
1010

1111
# TODO: Remove me once we have a driver with
1212
# https://github.com/swiftlang/swift-driver/pull/1803
1313
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xclang-linker -darwin-target-variant -Xclang-linker ${SwiftCore_COMPILER_VARIANT_TARGET}>")
1414

1515
add_link_options(
16-
"$<$<LINK_LANGUAGE:C,CXX>:SHELL:-darwin-target-variant ${SwiftCore_COMPILER_VARIANT_TARGET}>"
16+
"$<$<LINK_LANGUAGE:ASM,C,CXX>:SHELL:-darwin-target-variant ${SwiftCore_COMPILER_VARIANT_TARGET}>"
1717
"$<$<LINK_LANGUAGE:Swift>:SHELL:-target-variant ${SwiftCore_COMPILER_VARIANT_TARGET}>"
1818

1919
# TODO: Remove me once we have a driver with
@@ -42,4 +42,12 @@ if(SwiftCore_COMPILER_VARIANT_TARGET)
4242
message(CONFIGURE_LOG "Swift target variant deployment version: ${SwiftCore_VARIANT_DEPLOYMENT_VERSION}")
4343
endif()
4444
endif()
45+
46+
if(SwiftCore_EXPERIMENTAL_EMIT_VARIANT_MODULE)
47+
check_compiler_flag(Swift "-experimental-emit-variant-module" HAVE_Swift_EMIT_VARIANT_MODULE_FLAG)
48+
if(HAVE_Swift_EMIT_VARIANT_MODULE_FLAG)
49+
add_compile_options(
50+
"$<$<COMPILE_LANGUAGE:Swift>:-experimental-emit-variant-module>")
51+
endif()
52+
endif()
4553
endif()

Runtimes/Core/cmake/modules/DefaultSettings.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ elseif(WIN32)
7676
set(SwiftCore_ENABLE_CONCURRENCY_default NO)
7777
set(SwiftCore_ENABLE_REMOTE_MIRROR_default NO)
7878
set(SwiftCore_THREADING_PACKAGE_default "WIN32")
79-
set(SwiftCore_ENABLE_PRESPECIALIZATION_default ON)
79+
# FIXME(swiftlang/swift#84780) - generic prespecialization seems to cause
80+
# errors
81+
set(SwiftCore_ENABLE_PRESPECIALIZATION_default OFF)
8082
set(SwiftCore_CONCURRENCY_GLOBAL_EXECUTOR_default "dispatch")
8183

8284
set(SwiftCore_ENABLE_VECTOR_TYPES_default ON)

0 commit comments

Comments
 (0)