Skip to content

Commit dd499e9

Browse files
committed
Merge branch 'main' into issue75776
2 parents 910fc12 + e066bb2 commit dd499e9

File tree

3,375 files changed

+184030
-99160
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,375 files changed

+184030
-99160
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
trim_trailing_whitespace = false
9+
insert_final_newline = true

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ filename =
4444
exclude =
4545
.git,
4646
__pycache__,
47+
.build,
4748

4849
ignore =
4950
# The black tool treats slices consistently, the E203 warning is not PEP8

.github/CODEOWNERS

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
# TODO: /LICENSE.txt
3232
# TODO: /README.md
3333

34+
# Runtimes
35+
/Runtimes/**/CMakeLists.txt @etcwilde @compnerd @edymtt @justice-adams-apple
36+
/Runtimes/**/*.cmake @etcwilde @compnerd @edymtt @justice-adams-apple
37+
/Runtimes/Core/cmake/caches/Vendors/Apple/ @etcwilde @shahmishal @edymtt @justice-adams-apple
38+
3439
# SwiftCompilerSources
3540
/SwiftCompilerSources @eeckstein
3641

@@ -55,7 +60,7 @@
5560
/docs/Windows* @compnerd
5661

5762
# include
58-
/include/swift-c/DependencyScan/ @artemcm
63+
/include/swift-c/DependencyScan/ @artemcm @cachemeifyoucan
5964
/include/swift/*Demangl*/ @rjmccall
6065
/include/swift/AST/ @hborla @slavapestov @xedin
6166
/include/swift/AST/*Availability* @tshortli
@@ -66,12 +71,21 @@
6671
/include/swift/AST/*Protocol* @hborla @slavapestov
6772
/include/swift/AST/*Requirement* @hborla @slavapestov
6873
/include/swift/AST/*Substitution* @slavapestov
74+
/include/swift/AST/DiagnosticGroup* @DougGregor
75+
/include/swift/AST/DiagnosticsClangImporter.def @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun
76+
/include/swift/AST/DiagnosticsDriver.def @artemcm
77+
/include/swift/AST/DiagnosticsFrontend.def @artemcm @tshortli
78+
/include/swift/AST/DiagnosticsIDE.def @ahoppen @bnbarham @hamishknight @rintaro
79+
/include/swift/AST/DiagnosticsIRGen.def @rjmccall
80+
/include/swift/AST/DiagnosticsModuleDiffer.def @nkcsgexi
6981
/include/swift/AST/DiagnosticsParse.def @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
82+
/include/swift/AST/DiagnosticsRefactoring.def @ahoppen @bnbarham @hamishknight @rintaro
83+
/include/swift/AST/DiagnosticsSIL.def @jckarter
7084
/include/swift/AST/Evaluator* @CodaFi @slavapestov
7185
/include/swift/Basic/ @DougGregor
7286
/include/swift/Basic/Features.def @DougGregor @hborla
7387
/include/swift/ClangImporter @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun
74-
/include/swift/DependencyScan @artemcm
88+
/include/swift/DependencyScan @artemcm @cachemeifyoucan
7589
/include/swift/Driver*/ @artemcm
7690
/include/swift/Frontend*/ @artemcm @tshortli
7791
/include/swift/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
@@ -118,7 +132,7 @@
118132
/lib/Basic/Windows @compnerd
119133
/lib/ClangImporter @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun
120134
/lib/ClangImporter/DWARFImporter* @adrian-prantl
121-
/lib/DependencyScan @artemcm
135+
/lib/DependencyScan @artemcm @cachemeifyoucan
122136
/lib/Driver*/ @artemcm
123137
/lib/DriverTool/autolink_extract_main.cpp @MaxDesiatov @etcwilde
124138
/lib/DriverTool/sil* @jckarter
@@ -158,6 +172,7 @@
158172
/lib/Sema/Constraint* @hborla @xedin
159173
/lib/Sema/DerivedConformance* @slavapestov
160174
/lib/Sema/DerivedConformanceDistributed* @ktoso @slavapestov
175+
/lib/Sema/OpenedExistentials* @AnthonyLatsis @slavapestov
161176
/lib/Sema/TypeCheckDistributed* @hborla @ktoso @xedin
162177
/lib/Sema/TypeCheckProtocol* @AnthonyLatsis @hborla @slavapestov
163178
/lib/Sema/TypeCheckType* @AnthonyLatsis @hborla @slavapestov @xedin
@@ -175,7 +190,7 @@
175190
/stdlib/private/*Runtime*/ @rjmccall
176191
/stdlib/private/SwiftReflectionTest/ @slavapestov
177192
/stdlib/public/*Demangl*/ @rjmccall
178-
/stdlib/public/Backtracing/ @al45tair
193+
/stdlib/public/RuntimeModule/ @al45tair @mikeash
179194
/stdlib/public/Concurrency/ @ktoso
180195
/stdlib/public/Cxx/ @zoecarver @hyp @egorzhdan @Xazax-hun
181196
/stdlib/public/Distributed/ @ktoso
@@ -247,7 +262,7 @@
247262
/unittests/*Demangl*/ @rjmccall
248263
/unittests/AST/ @hborla @slavapestov @xedin
249264
/unittests/AST/*Evaluator* @CodaFi @slavapestov
250-
/unittests/DependencyScan/ @artemcm
265+
/unittests/DependencyScan/ @artemcm @cachemeifyoucan
251266
/unittests/FrontendTool/ @artemcm @tshortli
252267
/unittests/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
253268
/unittests/Reflection/ @slavapestov

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ docs/_build
5252

5353
# SwiftPM
5454
.build
55+
.index-build
5556
.swiftpm
5657

5758
#==============================================================================#
@@ -95,3 +96,4 @@ Runtimes/**/*.yaml
9596
Runtimes/**/*.inc
9697
Runtimes/**/*.json
9798
Runtimes/**/*.modulemap
99+
Runtimes/**/*.in

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@
55
66
## Swift 6.1
77

8+
* Projected value initializers are now correctly injected into calls when
9+
an argument exactly matches a parameter with an external property wrapper.
10+
11+
For example:
12+
13+
```swift
14+
struct Binding {
15+
...
16+
init(projectedValue: Self) { ... }
17+
}
18+
19+
func checkValue(@Binding value: Int) {}
20+
21+
func use(v: Binding<Int>) {
22+
checkValue($value: v)
23+
// Transformed into: `checkValue(value: Binding(projectedValue: v))`
24+
}
25+
```
26+
27+
Previous versions of the Swift compiler incorrectly omitted projected value
28+
initializer injection in the call to `checkValue` because the argument type
29+
matched the parameter type exactly.
30+
831
* [SE-0444][]:
932
When the upcoming feature `MemberImportVisibility` is enabled, Swift will
1033
require that a module be directly imported in a source file when resolving

CMakeLists.txt

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,6 @@ option(SWIFT_IMPLICIT_CONCURRENCY_IMPORT
695695
"Implicitly import the Swift concurrency module"
696696
TRUE)
697697

698-
option(SWIFT_IMPLICIT_BACKTRACING_IMPORT
699-
"Implicitly import the Swift backtracing module"
700-
FALSE)
701-
702698
option(SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY
703699
"Enable build of the Swift concurrency module"
704700
FALSE)
@@ -731,6 +727,10 @@ option(SWIFT_ENABLE_SYNCHRONIZATION
731727
"Enable build of the Swift Synchronization module"
732728
FALSE)
733729

730+
option(SWIFT_ENABLE_RUNTIME_MODULE
731+
"Build the Swift Runtime module"
732+
FALSE)
733+
734734
option(SWIFT_ENABLE_VOLATILE
735735
"Enable build of the Swift Volatile module"
736736
FALSE)
@@ -747,10 +747,6 @@ option(SWIFT_ENABLE_EXPERIMENTAL_PARSER_VALIDATION
747747
"Enable experimental SwiftParser validation by default"
748748
FALSE)
749749

750-
option(SWIFT_ENABLE_EXPERIMENTAL_POINTER_BOUNDS
751-
"Enable experimental safe wrappers around external functions"
752-
FALSE)
753-
754750
cmake_dependent_option(SWIFT_BUILD_SOURCEKIT
755751
"Build SourceKit" TRUE
756752
"SWIFT_ENABLE_DISPATCH" FALSE)
@@ -869,11 +865,6 @@ if (CMAKE_Swift_COMPILER)
869865
SWIFT_SUPPORTS_DISABLE_IMPLICIT_STRING_PROCESSING_MODULE_IMPORT)
870866
message(STATUS " Implicit 'string-processing' import: ${SWIFT_SUPPORTS_DISABLE_IMPLICIT_STRING_PROCESSING_MODULE_IMPORT}")
871867

872-
# Same for _Backtracing.
873-
swift_supports_implicit_module("backtracing"
874-
SWIFT_SUPPORTS_DISABLE_IMPLICIT_BACKTRACING_MODULE_IMPORT)
875-
message(STATUS " Implicit 'backtracing' import: ${SWIFT_SUPPORTS_DISABLE_IMPLICIT_BACKTRACING_MODULE_IMPORT}")
876-
877868
swift_get_package_cmo_support(
878869
Swift_COMPILER_PACKAGE_CMO_SUPPORT)
879870
message(STATUS " Package CMO: ${Swift_COMPILER_PACKAGE_CMO_SUPPORT}")
@@ -950,12 +941,6 @@ if (NOT BOOTSTRAPPING_MODE)
950941
message(FATAL_ERROR "turning off bootstrapping is not supported anymore")
951942
endif()
952943

953-
# As a temporary workaround, disable SwiftCompilerSources on
954-
# Windows/ARM64 because the compiler segfaults
955-
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64")
956-
set(BOOTSTRAPPING_MODE "OFF")
957-
endif()
958-
959944
set(SWIFT_RUNTIME_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin")
960945
set(SWIFT_LIBRARY_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib")
961946
if("${SWIFT_NATIVE_SWIFT_TOOLS_PATH}" STREQUAL "")
@@ -1038,11 +1023,6 @@ set(SWIFT_GYB_FLAGS
10381023
set(SWIFT_MODULE_CACHE_PATH
10391024
"${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/module-cache")
10401025

1041-
# Xcode: use libc++ and c++11 using proper build settings.
1042-
if(XCODE)
1043-
swift_common_xcode_cxx_config()
1044-
endif()
1045-
10461026
# Check what linux distribution is being used.
10471027
# This can be used to determine the default linker to use.
10481028
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.22")
@@ -1097,6 +1077,9 @@ endif()
10971077
#
10981078
swift_common_cxx_warnings()
10991079

1080+
# Set sanitizer options for Swift compiler.
1081+
swift_common_sanitizer_config()
1082+
11001083
# Check if we're build with MSVC or Clang-cl, as these compilers have similar command line arguments.
11011084
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
11021085
set(SWIFT_COMPILER_IS_MSVC_LIKE TRUE)
@@ -1404,6 +1387,7 @@ if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
14041387
message(STATUS "Synchronization Support: ${SWIFT_ENABLE_SYNCHRONIZATION}")
14051388
message(STATUS "Volatile Support: ${SWIFT_ENABLE_VOLATILE}")
14061389
message(STATUS "Pointer Bounds Support: ${SWIFT_ENABLE_EXPERIMENTAL_POINTER_BOUNDS}")
1390+
message(STATUS "Runtime Support: ${SWIFT_ENABLE_RUNTIME_MODULE}")
14071391
message(STATUS "")
14081392
else()
14091393
message(STATUS "Not building Swift standard library, SDK overlays, and runtime")
@@ -1588,6 +1572,7 @@ endif()
15881572
# New standard library build
15891573
option(SWIFT_ENABLE_NEW_RUNTIME_BUILD "Build Swift runtimes with new build system" OFF)
15901574
if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
1575+
message(STATUS "New runtime build enabled")
15911576

15921577
add_custom_target(PopulateRuntimeSourceDir
15931578
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Resync.cmake"
@@ -1604,6 +1589,13 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
16041589
if(${SWIFT_SDK_${sdk}_${arch}_CACHE})
16051590
set(stdlib_cache_file_flag -C ${SWIFT_SDK_${sdk}_${arch}_CACHE})
16061591
endif()
1592+
1593+
set(stdlib_target_triple ${SWIFT_SDK_${sdk}_ARCH_${arch}_TRIPLE})
1594+
if(SWIFT_SDK_${sdk}_DEPLOYMENT_VERSION)
1595+
string(APPEND stdlib_target_triple ${SWIFT_SDK_${sdk}_DEPLOYMENT_VERSION})
1596+
set(stdlib_deployment_version_flag -DCMAKE_OSX_DEPLOYMENT_TARGET=${SWIFT_SDK_${sdk}_DEPLOYMENT_VERSION})
1597+
endif()
1598+
16071599
ExternalProject_Add("${stdlib_target}-core"
16081600
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Core"
16091601
# TODO: Add this once we're ready to start swapping out the libraries
@@ -1617,12 +1609,19 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
16171609
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
16181610
-DBUILD_SHARED_LIBS:BOOLEAN=YES # TODO: Make this configurable
16191611
${stdlib_cache_file_flag}
1612+
${stdlib_deployment_version_flag}
16201613
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
16211614
-DCMAKE_INSTALL_PREFIX:FILEPATH=<INSTALL_DIR>
16221615
-DCMAKE_Swift_COMPILER:FILEPATH=$<IF:$<BOOL:${CMAKE_CROSSCOMPILING}>,${CMAKE_Swift_COMPILER},$<PATH:REPLACE_FILENAME,$<TARGET_FILE:swift-frontend>,swiftc>>
16231616
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
16241617
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
1625-
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS})
1618+
-DCMAKE_Swift_COMPILER_TARGET:STRING=${stdlib_target_triple}
1619+
-DCMAKE_C_COMPILER_TARGET:STRING=${stdlib_target_triple}
1620+
-DCMAKE_CXX_COMPILER_TARGET:STRING=${stdlib_target_triple}
1621+
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS}
1622+
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
1623+
-DSwiftCore_PLATFORM_SUBDIR=${SWIFT_SDK_${sdk}_LIB_SUBDIR}
1624+
-DSwiftCore_ARCH_SUBDIR=${arch})
16261625
if(NOT ${CMAKE_CROSSCOMPILING})
16271626
add_dependencies("${stdlib_target}" swift-frontend)
16281627
endif()

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
| **OS** | **Architecture** | **Build** |
3737
|---|:---:|:---:|
38-
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | ARMv7 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android)|
39-
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64)|
38+
|**[Android](https://github.com/swiftlang/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_ubuntu_24_04_android.json)** | X86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build)|
39+
|**[Android](https://github.com/swiftlang/swift-community-hosted-continuous-integration/blob/main/nodes/aarch64_ubuntu_24_04_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64)|
4040
|**[Windows 2019 (VS 2019)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/main/nodes/x86_64_windows_2019_VS2019.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019)|
4141

4242
## Welcome to Swift

0 commit comments

Comments
 (0)