Skip to content

Commit 3001177

Browse files
authored
Merge pull request #78372 from DougGregor/strict-safety-stdlib
[SE-0458] Adopt strict memory safety in the standard libraries
2 parents 1576ba4 + 7aac28e commit 3001177

File tree

184 files changed

+5102
-4947
lines changed

Some content is hidden

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

184 files changed

+5102
-4947
lines changed

Runtimes/Core/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ add_compile_options(
181181
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NoncopyableGenerics2>"
182182
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SuppressedAssociatedTypes>"
183183
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SE427NoInferenceOnExtension>"
184-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature AllowUnsafeAttribute>"
184+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-strict-memory-safety>"
185185
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NonescapableTypes>"
186186
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature LifetimeDependence>"
187187
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature MemberImportVisibility>"

lib/Serialization/Serialization.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ void Serializer::writeBlockInfoBlock() {
862862
BLOCK_RECORD(options_block, HAS_CXX_INTEROPERABILITY_ENABLED);
863863
BLOCK_RECORD(options_block, ALLOW_NON_RESILIENT_ACCESS);
864864
BLOCK_RECORD(options_block, SERIALIZE_PACKAGE_ENABLED);
865+
BLOCK_RECORD(options_block, STRICT_MEMORY_SAFETY);
865866
BLOCK_RECORD(options_block, CXX_STDLIB_KIND);
866867
BLOCK_RECORD(options_block, PUBLIC_MODULE_NAME);
867868
BLOCK_RECORD(options_block, SWIFT_INTERFACE_COMPILER_VERSION);

stdlib/cmake/modules/SwiftSource.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ function(_compile_swift_files
628628
list(APPEND swift_flags "-enable-experimental-feature" "NoncopyableGenerics2")
629629
list(APPEND swift_flags "-enable-experimental-feature" "SuppressedAssociatedTypes")
630630
list(APPEND swift_flags "-enable-experimental-feature" "SE427NoInferenceOnExtension")
631-
list(APPEND swift_flags "-enable-experimental-feature" "AllowUnsafeAttribute")
631+
632632
list(APPEND swift_flags "-enable-experimental-feature" "NonescapableTypes")
633633
list(APPEND swift_flags "-enable-experimental-feature" "LifetimeDependence")
634634

0 commit comments

Comments
 (0)