OpaqueValues: provide stdlib build option

Should allow testing with preset:
```
extra-cmake-options=-DSWIFT_STDLIB_EXTRA_SWIFT_COMPILE_FLAGS=TRUE
```
This commit is contained in:
Kavon Farvardin
2025-11-20 14:27:48 -08:00
parent 10d80531fd
commit 54e71d086a
2 changed files with 8 additions and 0 deletions

View File

@@ -776,6 +776,10 @@ option(SWIFT_STDLIB_ENABLE_STRICT_CONCURRENCY_COMPLETE
"Build the stdlib with -strict-concurrency=complete" "Build the stdlib with -strict-concurrency=complete"
FALSE) FALSE)
option(SWIFT_STDLIB_ENABLE_SIL_OPAQUE_VALUES
"Build the stdlib with -enable-sil-opaque-values"
FALSE)
option(SWIFT_ENABLE_SYNCHRONIZATION option(SWIFT_ENABLE_SYNCHRONIZATION
"Enable build of the Swift Synchronization module" "Enable build of the Swift Synchronization module"
FALSE) FALSE)

View File

@@ -647,6 +647,10 @@ function(_compile_swift_files
list(APPEND swift_flags "-strict-concurrency=complete") list(APPEND swift_flags "-strict-concurrency=complete")
endif() endif()
if (SWIFT_STDLIB_ENABLE_SIL_OPAQUE_VALUES)
list(APPEND swift_flags "-Xfrontend" "-enable-sil-opaque-values")
endif()
if (SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES) if (SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES)
list(APPEND swift_flags "-Xfrontend" "-enable-relative-protocol-witness-tables") list(APPEND swift_flags "-Xfrontend" "-enable-relative-protocol-witness-tables")
list(APPEND swift_flags "-Xfrontend" "-swift-async-frame-pointer=never") list(APPEND swift_flags "-Xfrontend" "-swift-async-frame-pointer=never")