Skip to content

Commit 81a6dbe

Browse files
authored
Merge branch 'swiftlang:main' into eng/statics-const-extract
2 parents 3a5d21e + 488581f commit 81a6dbe

File tree

994 files changed

+22889
-12860
lines changed

Some content is hidden

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

994 files changed

+22889
-12860
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@
55
66
## Swift (next)
77

8+
* Syntactic SourceKit queries no longer attempt to provide information
9+
within the inactive `#if` regions. For example, given:
10+
11+
```swift
12+
#if DEBUG
13+
extension MyType: CustomDebugStringConvertible {
14+
var debugDescription: String { ... }
15+
}
16+
#endif
17+
```
18+
19+
If `DEBUG` is not set, SourceKit results will not involve the
20+
inactive code. Clients should use either SourceKit-LSP or
21+
swift-syntax for syntactic queries that are independent of the
22+
specific build configuration.
23+
824
* [SE-0442][]:
925
TaskGroups can now be created without explicitly specifying their child task's result types:
1026

CMakeLists.txt

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ else()
155155
set(SWIFT_HOST_VARIANT_SDK_default "ANDROID")
156156
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
157157
set(SWIFT_HOST_VARIANT_SDK_default "OSX")
158+
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "WASI")
159+
set(SWIFT_HOST_VARIANT_SDK_default "WASI")
158160
else()
159161
message(FATAL_ERROR "Unable to detect SDK for host system: ${CMAKE_SYSTEM_NAME}")
160162
endif()
@@ -244,9 +246,16 @@ option(SWIFT_BUILD_CLANG_OVERLAYS
244246
"Build Swift overlays for the clang builtin modules"
245247
TRUE)
246248

249+
# The SDK overlay is provided by the SDK itself on Darwin platforms.
250+
if(SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)
251+
set(SWIFT_BUILD_DYNAMIC_SDK_OVERLAY_default FALSE)
252+
else()
253+
set(SWIFT_BUILD_DYNAMIC_SDK_OVERLAY_default TRUE)
254+
endif()
255+
247256
option(SWIFT_BUILD_DYNAMIC_SDK_OVERLAY
248257
"Build dynamic variants of the Swift SDK overlay"
249-
TRUE)
258+
"${SWIFT_BUILD_DYNAMIC_SDK_OVERLAY_default}")
250259

251260
option(SWIFT_BUILD_STATIC_SDK_OVERLAY
252261
"Build static variants of the Swift SDK overlay"
@@ -412,6 +421,17 @@ set(SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY
412421
${SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY_default}
413422
CACHE STRING "MSVC Runtime Library for the standard library")
414423

424+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS" AND
425+
CMAKE_BUILD_TYPE STREQUAL "Debug")
426+
# Building with the host Swift toolchain requires linking just-built binaries
427+
# against the host Swift runtime. In debug builds, that means linking a debug
428+
# binary against a release binary. The MSVC linker does not normally permit
429+
# this, since debug builds enable bounds-checked C++ iterators by default,
430+
# which are not ABI-compatible with regular iterators. Let's instruct MSVC to
431+
# disable bounds-checked iterators to make it possible to do a debug build of
432+
# the Swift compiler with a host toolchain.
433+
add_definitions(-D_ITERATOR_DEBUG_LEVEL=0)
434+
endif()
415435

416436
if(BRIDGING_MODE STREQUAL "DEFAULT" OR NOT BRIDGING_MODE)
417437
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS" OR (CMAKE_Swift_COMPILER AND CMAKE_Swift_COMPILER_VERSION VERSION_LESS 5.8))
@@ -556,16 +576,16 @@ option(SWIFT_ALLOW_LINKING_SWIFT_CONTENT_IN_DARWIN_TOOLCHAIN
556576
This is needed to support Apple internal configurations."
557577
FALSE)
558578

559-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX "10.13" CACHE STRING
579+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX "13.0" CACHE STRING
560580
"Minimum deployment target version for OS X")
561581

562-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS "11.0" CACHE STRING
582+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_IOS "16.0" CACHE STRING
563583
"Minimum deployment target version for iOS")
564584

565-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS "11.0" CACHE STRING
585+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_TVOS "16.0" CACHE STRING
566586
"Minimum deployment target version for tvOS")
567587

568-
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS "4.0" CACHE STRING
588+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_WATCHOS "6.0" CACHE STRING
569589
"Minimum deployment target version for watchOS")
570590

571591
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_XROS "1.0" CACHE STRING
@@ -696,10 +716,6 @@ option(SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED
696716
"Enable experimental distributed actors and functions"
697717
FALSE)
698718

699-
option(SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES
700-
"Enable experimental NonescapableTypes"
701-
FALSE)
702-
703719
option(SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING
704720
"Enable experimental string processing"
705721
FALSE)
@@ -1378,7 +1394,6 @@ if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
13781394
message(STATUS "Differentiable Programming Support: ${SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING}")
13791395
message(STATUS "Concurrency Support: ${SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY}")
13801396
message(STATUS "Distributed Support: ${SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED}")
1381-
message(STATUS "NonEscapableTypes Support: ${SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES}")
13821397
message(STATUS "String Processing Support: ${SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING}")
13831398
message(STATUS "Backtracing Support: ${SWIFT_ENABLE_BACKTRACING}")
13841399
message(STATUS "Unicode Support: ${SWIFT_STDLIB_ENABLE_UNICODE_DATA}")

0 commit comments

Comments
 (0)