Skip to content

Commit c178abb

Browse files
authored
Merge branch 'swiftlang:main' into issue-72199
2 parents d0798e2 + 08d46d2 commit c178abb

File tree

1,407 files changed

+57890
-18672
lines changed

Some content is hidden

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

1,407 files changed

+57890
-18672
lines changed

.github/CODEOWNERS

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
/include/swift/AST/*Requirement* @hborla @slavapestov
7979
/include/swift/AST/*Substitution* @slavapestov
8080
/include/swift/AST/DiagnosticGroup* @DougGregor
81-
/include/swift/AST/DiagnosticsClangImporter.def @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun @j-hui @fahadnayyar
81+
/include/swift/AST/DiagnosticsClangImporter.def @zoecarver @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun @j-hui @fahadnayyar @susmonteiro
8282
/include/swift/AST/DiagnosticsDriver.def @artemcm
8383
/include/swift/AST/DiagnosticsFrontend.def @artemcm @tshortli
8484
/include/swift/AST/DiagnosticsIDE.def @ahoppen @bnbarham @hamishknight @rintaro
@@ -90,7 +90,7 @@
9090
/include/swift/AST/Evaluator* @CodaFi @slavapestov
9191
/include/swift/Basic/ @DougGregor
9292
/include/swift/Basic/Features.def @DougGregor @hborla
93-
/include/swift/ClangImporter @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun @j-hui @fahadnayyar
93+
/include/swift/ClangImporter @zoecarver @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun @j-hui @fahadnayyar @susmonteiro
9494
/include/swift/DependencyScan @artemcm @cachemeifyoucan
9595
/include/swift/Driver*/ @artemcm
9696
/include/swift/Frontend*/ @artemcm @tshortli
@@ -101,9 +101,9 @@
101101
/include/swift/Migrator/ @nkcsgexi
102102
/include/swift/Option/*Options* @tshortli
103103
/include/swift/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
104-
/include/swift/PrintAsClang @zoecarver @hyp @egorzhdan @Xazax-hun @j-hui @fahadnayyar
104+
/include/swift/PrintAsClang @zoecarver @egorzhdan @Xazax-hun @j-hui @fahadnayyar @susmonteiro
105105
/include/swift/Refactoring @ahoppen @bnbarham @hamishknight @rintaro
106-
/include/swift/Runtime/ @rjmccall
106+
/include/swift/Runtime/ @rjmccall @compnerd
107107
/include/swift/SIL/ @jckarter
108108
/include/swift/SIL/*Coverage* @ahoppen @bnbarham @hamishknight @rintaro
109109
/include/swift/SIL/*DebugInfo* @adrian-prantl
@@ -136,7 +136,7 @@
136136
/lib/ASTGen/ @ahoppen @bnbarham @CodaFi @hamishknight @rintaro
137137
/lib/Basic/ @DougGregor
138138
/lib/Basic/Windows @compnerd
139-
/lib/ClangImporter @zoecarver @hyp @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun @j-hui @fahadnayyar
139+
/lib/ClangImporter @zoecarver @egorzhdan @beccadax @ian-twilightcoder @Xazax-hun @j-hui @fahadnayyar @susmonteiro
140140
/lib/ClangImporter/DWARFImporter* @adrian-prantl
141141
/lib/DependencyScan @artemcm @cachemeifyoucan
142142
/lib/Driver*/ @artemcm
@@ -152,10 +152,11 @@
152152
/lib/IRGen/*Debug* @adrian-prantl
153153
/lib/IRGen/*Distributed* @ktoso
154154
/lib/Index/ @ahoppen @bnbarham @hamishknight @rintaro
155+
/lib/Macros/Sources/SwiftMacros/Swiftify* @hnrklssn @Xazax-hun
155156
/lib/Markup/ @nkcsgexi
156157
/lib/Migrator/ @nkcsgexi
157158
/lib/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
158-
/lib/PrintAsClang @zoecarver @hyp @egorzhdan @Xazax-hun @j-hui @fahadnayyar
159+
/lib/PrintAsClang @zoecarver @egorzhdan @Xazax-hun @j-hui @fahadnayyar @susmonteiro
159160
/lib/Refactoring/ @ahoppen @bnbarham @hamishknight @rintaro
160161
/lib/SIL/ @jckarter
161162
/lib/SIL/**/*DebugInfo* @adrian-prantl
@@ -195,9 +196,10 @@
195196
/stdlib/ @swiftlang/standard-librarians
196197
/stdlib/private/*Runtime*/ @rjmccall
197198
/stdlib/private/SwiftReflectionTest/ @slavapestov
199+
/stdlib/public/core/Swiftify* @hnrklssn @Xazax-hun
198200
/stdlib/public/*Demangl*/ @rjmccall
199201
/stdlib/public/Concurrency/ @ktoso
200-
/stdlib/public/Cxx/ @zoecarver @hyp @egorzhdan @Xazax-hun @j-hui @fahadnayyar
202+
/stdlib/public/Cxx/ @zoecarver @egorzhdan @Xazax-hun @j-hui @fahadnayyar @susmonteiro
201203
/stdlib/public/Distributed/ @ktoso
202204
/stdlib/public/Observation/ @phausler
203205
/stdlib/public/RuntimeModule/ @al45tair @mikeash
@@ -223,7 +225,8 @@
223225
/test/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
224226
/test/IRGen/ @rjmccall
225227
/test/Index/ @ahoppen @bnbarham @hamishknight @rintaro
226-
/test/Interop/ @zoecarver @hyp @egorzhdan @Xazax-hun @j-hui @fahadnayyar
228+
/test/Interop/ @zoecarver @egorzhdan @Xazax-hun @j-hui @fahadnayyar @susmonteiro @hnrklssn
229+
/test/Macros/SwiftifyImport @hnrklssn @Xazax-hun
227230
/test/Migrator/ @nkcsgexi
228231
/test/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
229232
/test/Profiler @ahoppen @bnbarham @hamishknight @rintaro

CHANGELOG.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@
55
66
## Swift 6.2
77

8+
* [SE-0419][]:
9+
Introduced the new `Runtime` module, which contains a public API that can
10+
generate backtraces, presently supported on macOS and Linux. Capturing a
11+
backtrace is as simple as
12+
13+
```swift
14+
import Runtime
15+
16+
func foo() {
17+
// Without symbols
18+
let backtrace = try! Backtrace.capture()
19+
20+
print(backtrace)
21+
22+
// With symbol lookup
23+
let symbolicated = backtrace.symbolicated()!
24+
25+
print(symbolicated)
26+
}
27+
```
28+
829
* [SE-0458][]:
930
Introduced an opt-in mode for strict checking of memory safety, which can be
1031
enabled with the compiler flag `-strict-memory-safety`. In this mode,
@@ -13,12 +34,12 @@
1334

1435
```swift
1536
func evilMalloc(size: Int) -> Int {
16-
// warning: call to global function 'malloc' involves unsafe type 'UnsafeMutableRawPointer'
37+
// use of global function 'malloc' involves unsafe type 'UnsafeMutableRawPointer'
1738
return Int(bitPattern: malloc(size))
1839
}
1940
```
2041

21-
These warnings are in their own diagnostic group (`Unsafe`) and can
42+
These warnings are in their own diagnostic group (`StrictMemorySafety`) and can
2243
be suppressed by ackwnowledging the memory-unsafe behavior, for
2344
example with an `unsafe` expression:
2445

@@ -10703,6 +10724,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
1070310724
[SE-0432]: https://github.com/apple/swift-evolution/blob/main/proposals/0432-noncopyable-switch.md
1070410725
[SE-0430]: https://github.com/apple/swift-evolution/blob/main/proposals/0430-transferring-parameters-and-results.md
1070510726
[SE-0418]: https://github.com/apple/swift-evolution/blob/main/proposals/0418-inferring-sendable-for-methods.md
10727+
[SE-0419]: https://github.com/swiftlang/swift-evolution/blob/main/proposals/0419-backtrace-api.md
1070610728
[SE-0423]: https://github.com/apple/swift-evolution/blob/main/proposals/0423-dynamic-actor-isolation.md
1070710729
[SE-0424]: https://github.com/apple/swift-evolution/blob/main/proposals/0424-custom-isolation-checking-for-serialexecutor.md
1070810730
[SE-0428]: https://github.com/apple/swift-evolution/blob/main/proposals/0428-resolve-distributed-actor-protocols.md

CMakeLists.txt

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,9 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
487487
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
488488
"Path to the directory that contains Swift tools that are executable on the build machine")
489489

490+
set(SWIFT_WASI_SYSROOT_PATH "" CACHE PATH
491+
"Path to the directory that contains WASI Sysroot")
492+
490493
option(SWIFT_STDLIB_ENABLE_SIB_TARGETS
491494
"Should we generate sib targets for the stdlib or not?"
492495
FALSE)
@@ -572,6 +575,17 @@ set(SWIFT_DARWIN_XCRUN_TOOLCHAIN "XcodeDefault" CACHE STRING
572575
set(SWIFT_DARWIN_STDLIB_INSTALL_NAME_DIR "/usr/lib/swift" CACHE STRING
573576
"The directory of the install_name for standard library dylibs")
574577

578+
#
579+
# User-configurable OpenBSD-specific options.
580+
#
581+
582+
option(SWIFT_OPENBSD_BTCFI
583+
"Emit branch target identification instructions and sign return addresses when available"
584+
FALSE)
585+
if(SWIFT_OPENBSD_BTCFI)
586+
add_definitions("-DSWIFT_OPENBSD_BTCFI")
587+
endif()
588+
575589
# We don't want to use the same install_name_dir as the standard library which
576590
# will be installed in /usr/lib/swift. These private libraries should continue
577591
# to use @rpath for now.
@@ -1627,7 +1641,7 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
16271641

16281642
DEPENDS PopulateRuntimeSourceDir
16291643
CMAKE_ARGS
1630-
-DCMAKE_INSTALL_LIBDIR:FILEPATH=lib/swift/${SWIFT_SDK_${sdk}_LIB_SUBDIR}/${arch}
1644+
-DCMAKE_INSTALL_LIBDIR:FILEPATH=lib
16311645
# Compiler will see mismatched swift modules and fail initial checks
16321646
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
16331647
-DBUILD_SHARED_LIBS:BOOLEAN=YES # TODO: Make this configurable
@@ -1643,12 +1657,33 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
16431657
-DCMAKE_CXX_COMPILER_TARGET:STRING=${stdlib_target_triple}
16441658
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS}
16451659
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
1646-
-DSwiftCore_PLATFORM_SUBDIR=${SWIFT_SDK_${sdk}_LIB_SUBDIR}
1647-
-DSwiftCore_ARCH_SUBDIR=${arch}
1660+
-DSwiftCore_INSTALL_NESTED_SUBDIR=YES
16481661
-DSwiftCore_ENABLE_CONCURRENCY=YES)
16491662
if(NOT ${CMAKE_CROSSCOMPILING})
1650-
add_dependencies("${stdlib_target}" swift-frontend)
1663+
add_dependencies("${stdlib_target}-core" swift-frontend)
16511664
endif()
1665+
1666+
ExternalProject_Get_Property("${stdlib_target}-core" INSTALL_DIR)
1667+
1668+
ExternalProject_Add("${stdlib_target}-StringProcessing"
1669+
SOURCE_DIR
1670+
"${CMAKE_CURRENT_SOURCE_DIR}/Runtimes/Supplemental/StringProcessing"
1671+
DEPENDS "${stdlib_target}-core"
1672+
INSTALL_DIR "${INSTALL_DIR}"
1673+
INSTALL_COMMAND "" # No install story set up yet
1674+
CMAKE_ARGS
1675+
-DBUILD_SHARED_LIBS=YES
1676+
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
1677+
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
1678+
-DCMAKE_INSTALL_PREFIX:FILEPATH=${INSTALL_DIR}
1679+
-DCMAKE_Swift_COMPILER:FILEPATH=$<IF:$<BOOL:${CMAKE_CROSSCOMPILING}>,${CMAKE_Swift_COMPILER},$<PATH:REPLACE_FILENAME,$<TARGET_FILE:swift-frontend>,swiftc>>
1680+
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
1681+
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
1682+
-DCMAKE_Swift_COMPILER_TARGET:STRING=${stdlib_target_triple}
1683+
-DCMAKE_C_COMPILER_TARGET:STRING=${stdlib_target_triple}
1684+
-DCMAKE_CXX_COMPILER_TARGET:STRING=${stdlib_target_triple}
1685+
-DCMAKE_COLOR_DIAGNOSTICS:BOOLEAN=${CMAKE_COLOR_DIAGNOSTICS}
1686+
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM})
16521687
endforeach()
16531688
endforeach()
16541689
endif()

Runtimes/Core/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@
2929
# -- Will need shadow invocations to generate swiftmodules for Swift parts
3030
# Install *.abi.json, swiftdoc, and swiftsourceinfo
3131

32-
cmake_minimum_required(VERSION 3.26...3.29)
32+
cmake_minimum_required(VERSION 3.29)
3333

3434
set(CMAKE_C_VISIBILITY_PRESET "hidden")
3535
set(CMAKE_CXX_VISIBILITY_PRESET "hidden")
3636
set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)
3737

38+
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
39+
3840
set(SwiftCore_CMAKE_MODULES_DIR "${CMAKE_SOURCE_DIR}/cmake/modules")
3941
list(APPEND CMAKE_MODULE_PATH ${SwiftCore_CMAKE_MODULES_DIR})
4042

@@ -174,6 +176,7 @@ add_compile_options(
174176
add_link_options($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
175177

176178
add_compile_options(
179+
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
177180
"$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>"
178181
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-library-level api>"
179182
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-runtime-compatibility-version none>"
@@ -223,12 +226,12 @@ install(EXPORT SwiftCoreTargets
223226
COMPONENT SwiftCore_cmake)
224227
include(CMakePackageConfigHelpers)
225228
configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/interface/SwiftCoreConfig.cmake.in"
226-
"${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCoreConfig.cmake"
229+
"${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCore/SwiftCoreConfig.cmake"
227230
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/SwiftCore")
228-
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCoreConfigVersion.cmake"
231+
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCore/SwiftCoreConfigVersion.cmake"
229232
VERSION "${PROJECT_VERSION}"
230233
COMPATIBILITY ExactVersion)
231234
install(FILES
232-
"${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCoreConfig.cmake"
233-
"${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCoreConfigVersion.cmake"
235+
"${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCore/SwiftCoreConfig.cmake"
236+
"${CMAKE_CURRENT_BINARY_DIR}/cmake/SwiftCore/SwiftCoreConfigVersion.cmake"
234237
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/SwiftCore")

Runtimes/Core/Concurrency/CMakeLists.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ add_library(swift_Concurrency
1111
ConcurrencyHooks.cpp
1212
EmbeddedSupport.cpp
1313
Error.cpp
14+
ExecutorBridge.cpp
1415
ExecutorChecks.cpp
1516
GlobalExecutor.cpp
1617
Setup.cpp
@@ -47,6 +48,7 @@ add_library(swift_Concurrency
4748
CheckedContinuation.swift
4849
Clock.swift
4950
ContinuousClock.swift
51+
CooperativeExecutor.swift
5052
Deque/_DequeBuffer.swift
5153
Deque/_DequeBufferHeader.swift
5254
Deque/_DequeSlot.swift
@@ -67,19 +69,27 @@ add_library(swift_Concurrency
6769
Deque/Deque+UnsafeHandle.swift
6870
Deque/UnsafeMutableBufferPointer+Utilities.swift
6971
DiscardingTaskGroup.swift
72+
DummyExecutor.swift
7073
Errors.swift
7174
Executor.swift
7275
ExecutorAssertions.swift
76+
ExecutorBridge.swift
7377
GlobalActor.swift
7478
GlobalConcurrentExecutor.swift
7579
MainActor.swift
7680
PartialAsyncTask.swift
81+
PlatformExecutorDarwin.swift
82+
PlatformExecutorLinux.swift
83+
PlatformExecutorWindows.swift
84+
PriorityQueue.swift
7785
SourceCompatibilityShims.swift
7886
SuspendingClock.swift
7987
Task.swift
88+
Task+PriorityEscalation.swift
8089
Task+TaskExecutor.swift
8190
TaskCancellation.swift
8291
TaskGroup.swift
92+
TaskGroup+Embedded.swift
8393
TaskLocal.swift
8494
TaskSleep.swift
8595
TaskSleepDuration.swift
@@ -115,12 +125,10 @@ target_link_libraries(swift_Concurrency PRIVATE
115125
$<$<PLATFORM_ID:Windows>:Synchronization>
116126
$<$<PLATFORM_ID:Windows>:mincore>
117127
# Link to the runtime that we are just building.
118-
swiftCore
119-
$<$<NOT:$<PLATFORM_ID:Darwin>>:swiftrt>)
120-
target_link_options(swift_Concurrency PRIVATE
121-
-nostartfiles)
128+
swiftCore)
122129
set_target_properties(swift_Concurrency PROPERTIES
123-
Swift_MODULE_NAME _Concurrency)
130+
Swift_MODULE_NAME _Concurrency
131+
LINKER_LANGUAGE CXX)
124132

125133
install(TARGETS swift_Concurrency
126134
EXPORT SwiftCoreTargets
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
add_library(swiftConcurrencyInternalShims INTERFACE)
22
target_include_directories(swiftConcurrencyInternalShims INTERFACE
3-
${CMAKE_CURRENT_SOURCE_DIR})
3+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
4+
5+
install(TARGETS swiftConcurrencyInternalShims
6+
EXPORT SwiftCoreTargets
7+
COMPONENT SwiftCore_runtime)
8+

Runtimes/Core/Concurrency/dispatch.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
find_package(dispatch QUIET REQUIRED)
33

44
target_sources(swift_Concurrency PRIVATE
5-
DispatchGlobalExecutor.cpp)
5+
DispatchGlobalExecutor.cpp
6+
DispatchExecutor.swift
7+
CFExecutor.swift
8+
ExecutorImpl.swift)
69
target_compile_definitions(swift_Concurrency PRIVATE
710
$<$<COMPILE_LANGUAGE:C,CXX>:-DSWIFT_CONCURRENCY_USES_DISPATCH=1>)
811
target_compile_options(swift_Concurrency PRIVATE
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
target_sources(swift_Concurrency PRIVATE
2-
NonDispatchGlobalExecutor.cpp)
2+
ExecutorImpl.swift
3+
PlatformExecutorNone.swift)

Runtimes/Core/Concurrency/none.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
target_sources(swift_Concurrency PRIVATE
2-
NonDispatchGlobalExecutor.cpp)
2+
ExecutorImpl.swift
3+
PlatformExecutorNone.swift)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
target_sources(swift_Concurrency PRIVATE
2-
CooperativeGlobalExecutor.cpp)
2+
ExecutorImpl.swift
3+
PlatformExecutorCooperative.swift)

Runtimes/Core/SwiftShims/swift/shims/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ target_compile_definitions(swiftShims INTERFACE
3939
$<$<AND:$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>,$<COMPILE_LANGUAGE:C,CXX>>:SWIFT_STATIC_STDLIB>)
4040
target_compile_options(swiftShims INTERFACE
4141
"$<$<AND:$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>,$<COMPILE_LANGUAGE:Swift>>:SHELL:-Xcc -DSWIFT_STATIC_STDLIB>"
42-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/module.modulemap>$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_LIBDIR}/swift/shims/module.modulemap>>")
42+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=\"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/module.modulemap>$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_LIBDIR}/swift/shims/module.modulemap>\">")
4343

4444
install(TARGETS swiftShims
4545
EXPORT SwiftCoreTargets
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
find_program(SCCACHE_EXECUTABLE sccache)
2+
3+
if(SCCACHE_EXECUTABLE)
4+
set(CMAKE_C_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" CACHE FILEPATH "")
5+
set(CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_EXECUTABLE}" CACHE FILEPATH "")
6+
message(STATUS "sccache enabled")
7+
endif()

Runtimes/Core/cmake/modules/DefaultSettings.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ elseif(LINUX OR ANDROID OR BSD)
6262
set(SwiftCore_CONCURRENCY_GLOBAL_EXECUTOR_default "dispatch")
6363
elseif(WIN32)
6464
set(SwiftCore_OBJECT_FORMAT_default "coff")
65-
set(SwiftCore_THREADING_PACKAGE_default "WIN32")
65+
set(SwiftCore_ENABLE_REFLECTION_default ON)
6666
set(SwiftCore_ENABLE_FATALERROR_BACKTRACE_default ON)
67-
set(SwiftCore_ENABLE_PRESPECIALIZATION_default ON)
6867
set(SwiftCore_ENABLE_CONCURRENCY_default NO)
68+
set(SwiftCore_THREADING_PACKAGE_default "WIN32")
69+
set(SwiftCore_ENABLE_PRESPECIALIZATION_default ON)
6970
set(SwiftCore_CONCURRENCY_GLOBAL_EXECUTOR_default "dispatch")
7071
endif()
7172

Runtimes/Core/cmake/modules/ExperimentalFeatures.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ add_compile_options(
1010
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature FreestandingMacros>"
1111
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature BitwiseCopyable>"
1212
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature Extern>"
13-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature ValueGenerics>"
14-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature AddressableParameters>")
13+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature AllowUnsafeAttribute>"
14+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature ValueGenerics>")

0 commit comments

Comments
 (0)