Skip to content

Commit c6d76f2

Browse files
authored
Revert "[CMake] Begin moving Standard Library options in a separate file (#40610)"
This reverts commit 871c6b9.
1 parent e5bfda7 commit c6d76f2

File tree

3 files changed

+16
-29
lines changed

3 files changed

+16
-29
lines changed

cmake/modules/StandaloneOverlay.cmake

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# In some configurations (e.g. back deploy concurrency) we
2-
# configure the build from the root of the Swift repo but we skip
3-
# stdlib/CMakeLists.txt, with the risk of missing important parameters.
4-
# To account for this scenario, we include the stdlib options
5-
# before the guard
6-
include(${CMAKE_CURRENT_LIST_DIR}/../../stdlib/cmake/modules/StdlibOptions.cmake)
7-
81
# CMAKE_SOURCE_DIR is the directory that cmake got initially invoked on.
92
# CMAKE_CURRENT_SOURCE_DIR is the current directory. If these are equal, it's
103
# a top-level build of the CMAKE_SOURCE_DIR. Otherwise, define a guard variable
@@ -92,6 +85,10 @@ set(SWIFT_DARWIN_MODULE_ARCHS "" CACHE STRING
9285
targets on Darwin platforms. These targets are in addition to the full \
9386
library targets.")
9487

88+
option(SWIFT_STDLIB_SHORT_MANGLING_LOOKUPS
89+
"Build stdlib with fast-path context descriptor lookups based on well-known short manglings."
90+
TRUE)
91+
9592
# -----------------------------------------------------------------------------
9693
# Constants
9794

stdlib/CMakeLists.txt

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,9 @@ endif()
7272
# User-configurable options for the standard library.
7373
#
7474

75-
# New options should be added to stdlib/cmake/modules/StdlibOptions.cmake,
76-
# so that they are considered in configurations using StandaloneOverlay.cmake
77-
7875
# NOTE: Some of these variables are also initialized in StandaloneOverlay.cmake
7976
# so that interfaces are emitted when overlays are separately built.
8077

81-
# TODO: migrate this section to StdlibOptions.cmake to reduce duplication
82-
8378
set(SWIFT_STDLIB_EXTRA_SWIFT_COMPILE_FLAGS "" CACHE STRING
8479
"Extra flags to pass when compiling swift stdlib files")
8580

@@ -94,6 +89,10 @@ option(SWIFT_ENABLE_MODULE_INTERFACES
9489
"Generate .swiftinterface files alongside .swiftmodule files"
9590
"${SWIFT_STDLIB_STABLE_ABI}")
9691

92+
option(SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT
93+
"Support back-deployment of built binaries to older OS versions."
94+
TRUE)
95+
9796
option(SWIFT_STDLIB_HAS_DLADDR
9897
"Build stdlib assuming the runtime environment runtime environment provides dladdr API."
9998
TRUE)
@@ -134,6 +133,10 @@ option(SWIFT_STDLIB_PASSTHROUGH_METADATA_ALLOCATOR
134133
"Build stdlib without a custom implementation of MetadataAllocator, relying on malloc+free instead."
135134
FALSE)
136135

136+
option(SWIFT_STDLIB_SHORT_MANGLING_LOOKUPS
137+
"Build stdlib with fast-path context descriptor lookups based on well-known short manglings."
138+
TRUE)
139+
137140
option(SWIFT_STDLIB_HAS_COMMANDLINE
138141
"Build stdlib with the CommandLine enum and support for argv/argc."
139142
TRUE)
@@ -161,6 +164,10 @@ option(SWIFT_ENABLE_REFLECTION
161164
"Build stdlib with support for runtime reflection and mirrors."
162165
TRUE)
163166

167+
option(SWIFT_STDLIB_BUILD_PRIVATE
168+
"Build private part of the Standard Library."
169+
TRUE)
170+
164171
if(SWIFT_STDLIB_SINGLE_THREADED_RUNTIME)
165172
set(SWIFT_CONCURRENCY_GLOBAL_EXECUTOR_default "singlethreaded")
166173
else()
@@ -171,10 +178,6 @@ set(SWIFT_CONCURRENCY_GLOBAL_EXECUTOR
171178
"${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR_default}" CACHE STRING
172179
"Build the concurrency library to use the given global executor (options: dispatch, singlethreaded, hooked)")
173180

174-
# New options should be added to stdlib/cmake/modules/StdlibOptions.cmake,
175-
# so that they are considered in configurations using StandaloneOverlay.cmake
176-
include(StdlibOptions)
177-
178181
#
179182
# End of user-configurable options.
180183
#

stdlib/cmake/modules/StdlibOptions.cmake

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)