mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SE-0458] Enable strict memory safety in the Swift standard library
This commit is contained in:
@@ -182,7 +182,7 @@ add_compile_options(
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NoncopyableGenerics2>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SuppressedAssociatedTypes>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SE427NoInferenceOnExtension>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature AllowUnsafeAttribute>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-strict-memory-safety>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NonescapableTypes>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature LifetimeDependence>"
|
||||
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature MemberImportVisibility>"
|
||||
|
||||
@@ -628,7 +628,7 @@ function(_compile_swift_files
|
||||
list(APPEND swift_flags "-enable-experimental-feature" "NoncopyableGenerics2")
|
||||
list(APPEND swift_flags "-enable-experimental-feature" "SuppressedAssociatedTypes")
|
||||
list(APPEND swift_flags "-enable-experimental-feature" "SE427NoInferenceOnExtension")
|
||||
list(APPEND swift_flags "-enable-experimental-feature" "AllowUnsafeAttribute")
|
||||
|
||||
list(APPEND swift_flags "-enable-experimental-feature" "NonescapableTypes")
|
||||
list(APPEND swift_flags "-enable-experimental-feature" "LifetimeDependence")
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ set(swiftOnoneSupport_common_options
|
||||
|
||||
"${SWIFT_SOURCE_DIR}/stdlib/linker-support/magic-symbols-for-install-name.c"
|
||||
|
||||
SWIFT_COMPILE_FLAGS "-parse-stdlib" "-Xllvm" "-sil-inline-generics=false" "-Xfrontend" "-validate-tbd-against-ir=none" "-Xfrontend" "-check-onone-completeness" "-Xfrontend" "-disable-access-control" "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}" "${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}"
|
||||
SWIFT_COMPILE_FLAGS "-parse-stdlib" "-Xllvm" "-sil-inline-generics=false" "-Xfrontend" "-validate-tbd-against-ir=none" "-Xfrontend" "-check-onone-completeness" "-Xfrontend" "-disable-access-control" "-strict-memory-safety" "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}" "${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}"
|
||||
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}")
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING")
|
||||
|
||||
@@ -322,6 +322,7 @@ list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "BitwiseCo
|
||||
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "ValueGenerics")
|
||||
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "AddressableParameters")
|
||||
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "AddressableTypes")
|
||||
list(APPEND swift_stdlib_compile_flags "-strict-memory-safety")
|
||||
|
||||
if("${SWIFT_NATIVE_SWIFT_TOOLS_PATH}" STREQUAL "")
|
||||
set(swift_bin_dir "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
Reference in New Issue
Block a user