@@ -9,10 +9,43 @@ project(swift-stdlib LANGUAGES C CXX)
9
9
list (APPEND CMAKE_MODULE_PATH
10
10
"${CMAKE_CURRENT_SOURCE_DIR} /cmake/modules" )
11
11
12
+ if ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "OSX" )
13
+ # All Darwin platforms have ABI stability.
14
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
15
+ elseif ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "LINUX" )
16
+ # TODO(mracek): This should get turned off, as this is not an ABI stable platform.
17
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
18
+ elseif ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "FREEBSD" )
19
+ # TODO(mracek): This should get turned off, as this is not an ABI stable platform.
20
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
21
+ elseif ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "OPENBSD" )
22
+ # TODO(mracek): This should get turned off, as this is not an ABI stable platform.
23
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
24
+ elseif ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "CYGWIN" )
25
+ # TODO(mracek): This should get turned off, as this is not an ABI stable platform.
26
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
27
+ elseif ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "WINDOWS" )
28
+ # TODO(mracek): This should get turned off, as this is not an ABI stable platform.
29
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
30
+ elseif ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "HAIKU" )
31
+ # TODO(mracek): This should get turned off, as this is not an ABI stable platform.
32
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
33
+ elseif ("${SWIFT_HOST_VARIANT_SDK} " STREQUAL "ANDROID" )
34
+ # TODO(mracek): This should get turned off, as this is not an ABI stable platform.
35
+ set (SWIFT_STDLIB_STABLE_ABI_default TRUE )
36
+ else ()
37
+ # Any new platform should have non-stable ABI to start with.
38
+ set (SWIFT_STDLIB_STABLE_ABI_default FALSE )
39
+ endif ()
40
+
12
41
#
13
42
# User-configurable options for the standard library.
14
43
#
15
44
45
+ option (SWIFT_STDLIB_STABLE_ABI
46
+ "Should stdlib be built with stable ABI (library evolution, resilience)."
47
+ "${SWIFT_STDLIB_STABLE_ABI_default} " )
48
+
16
49
option (SWIFT_ENABLE_COMPATIBILITY_OVERRIDES
17
50
"Support back-deploying compatibility fixes for newer apps running on older runtimes."
18
51
TRUE )
@@ -29,6 +62,10 @@ option(SWIFT_STDLIB_OS_VERSIONING
29
62
"Build stdlib with availability based on OS versions (Darwin only)."
30
63
TRUE )
31
64
65
+ option (SWIFT_ENABLE_MODULE_INTERFACES
66
+ "Generate .swiftinterface files alongside .swiftmodule files"
67
+ "${SWIFT_STDLIB_STABLE_ABI} " )
68
+
32
69
#
33
70
# End of user-configurable options.
34
71
#
0 commit comments