@@ -9,10 +9,43 @@ project(swift-stdlib LANGUAGES C CXX)
99list (APPEND CMAKE_MODULE_PATH
1010 "${CMAKE_CURRENT_SOURCE_DIR} /cmake/modules" )
1111
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+
1241#
1342# User-configurable options for the standard library.
1443#
1544
45+ option (SWIFT_STDLIB_STABLE_ABI
46+ "Should stdlib be built with stable ABI (library evolution, resilience)."
47+ "${SWIFT_STDLIB_STABLE_ABI_default} " )
48+
1649option (SWIFT_ENABLE_COMPATIBILITY_OVERRIDES
1750 "Support back-deploying compatibility fixes for newer apps running on older runtimes."
1851 TRUE )
@@ -29,6 +62,10 @@ option(SWIFT_STDLIB_OS_VERSIONING
2962 "Build stdlib with availability based on OS versions (Darwin only)."
3063 TRUE )
3164
65+ option (SWIFT_ENABLE_MODULE_INTERFACES
66+ "Generate .swiftinterface files alongside .swiftmodule files"
67+ "${SWIFT_STDLIB_STABLE_ABI} " )
68+
3269#
3370# End of user-configurable options.
3471#
0 commit comments