@@ -101,25 +101,6 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
101
101
message (STATUS "No build type was specified, will default to ${CMAKE_BUILD_TYPE} " )
102
102
endif ()
103
103
104
- set (SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE} " CACHE STRING
105
- "Build type for the Swift standard library and SDK overlays [Debug, RelWithDebInfo, Release, MinSizeRel]" )
106
- set_property (CACHE SWIFT_STDLIB_BUILD_TYPE PROPERTY
107
- STRINGS "Debug" "RelWithDebInfo" "Release" "MinSizeRel" )
108
-
109
- is_build_type_optimized ("${SWIFT_STDLIB_BUILD_TYPE} " swift_optimized )
110
- if (swift_optimized )
111
- set (SWIFT_STDLIB_ASSERTIONS_default FALSE )
112
- else ()
113
- set (SWIFT_STDLIB_ASSERTIONS_default TRUE )
114
- endif ()
115
- option (SWIFT_STDLIB_ASSERTIONS
116
- "Enable internal checks for the Swift standard library (useful for debugging the library itself, does not affect checks required for safety)"
117
- "${SWIFT_STDLIB_ASSERTIONS_default} " )
118
-
119
- option (SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER
120
- "Use the host compiler and not the internal clang to build the swift runtime"
121
- FALSE )
122
-
123
104
set (SWIFT_ANALYZE_CODE_COVERAGE FALSE CACHE STRING
124
105
"Build Swift with code coverage instrumenting enabled [FALSE, NOT-MERGED, MERGED]" )
125
106
set_property (CACHE SWIFT_ANALYZE_CODE_COVERAGE PROPERTY
@@ -146,23 +127,6 @@ set(SWIFT_ENABLE_LLD_LINKER TRUE CACHE BOOL
146
127
set (SWIFT_ENABLE_GOLD_LINKER TRUE CACHE BOOL
147
128
"Enable using the gold linker when available" )
148
129
149
- set (SWIFT_SDKS "" CACHE STRING
150
- "If non-empty, limits building target binaries only to specified SDKs (despite other SDKs being available)" )
151
-
152
- set (SWIFT_PRIMARY_VARIANT_SDK "" CACHE STRING
153
- "Primary SDK for target binaries" )
154
- set (SWIFT_PRIMARY_VARIANT_ARCH "" CACHE STRING
155
- "Primary arch for target binaries" )
156
-
157
- set (SWIFT_NATIVE_LLVM_TOOLS_PATH "" CACHE STRING
158
- "Path to the directory that contains LLVM tools that are executable on the build machine" )
159
-
160
- set (SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
161
- "Path to the directory that contains Clang tools that are executable on the build machine" )
162
-
163
- set (SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
164
- "Path to the directory that contains Swift tools that are executable on the build machine" )
165
-
166
130
set (SWIFT_TOOLS_ENABLE_LTO OFF CACHE STRING "Build Swift tools with LTO. One
167
131
must specify the form of LTO by setting this to one of: 'full', 'thin'. This
168
132
option only affects the tools that run on the host (the compiler), and has
@@ -176,10 +140,6 @@ option(SWIFT_FORCE_OPTIMIZED_TYPECHECKER "Override the optimization setting of
176
140
the type checker so that it always compiles with optimization. This eases
177
141
debugging after type checking occurs by speeding up type checking" FALSE )
178
142
179
- option (SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
180
- "Generate .swiftinterface files alongside .swiftmodule files"
181
- TRUE )
182
-
183
143
# Allow building Swift with Clang's Profile Guided Optimization
184
144
if (SWIFT_PROFDATA_FILE AND EXISTS ${SWIFT_PROFDATA_FILE} )
185
145
if (NOT CMAKE_C_COMPILER_ID MATCHES Clang )
@@ -188,6 +148,57 @@ if(SWIFT_PROFDATA_FILE AND EXISTS ${SWIFT_PROFDATA_FILE})
188
148
add_definitions ("-fprofile-instr-use=${SWIFT_PROFDATA_FILE} " )
189
149
endif ()
190
150
151
+ #
152
+ # User-configurable Swift Standard Library specific options.
153
+ #
154
+ # TODO: Once the stdlib/compiler builds are split, this should be sunk into the
155
+ # stdlib cmake.
156
+ #
157
+
158
+ set (SWIFT_STDLIB_BUILD_TYPE "${CMAKE_BUILD_TYPE} " CACHE STRING
159
+ "Build type for the Swift standard library and SDK overlays [Debug, RelWithDebInfo, Release, MinSizeRel]" )
160
+ set_property (CACHE SWIFT_STDLIB_BUILD_TYPE PROPERTY
161
+ STRINGS "Debug" "RelWithDebInfo" "Release" "MinSizeRel" )
162
+
163
+ is_build_type_optimized ("${SWIFT_STDLIB_BUILD_TYPE} " swift_optimized )
164
+ if (swift_optimized )
165
+ set (SWIFT_STDLIB_ASSERTIONS_default FALSE )
166
+ else ()
167
+ set (SWIFT_STDLIB_ASSERTIONS_default TRUE )
168
+ endif ()
169
+ option (SWIFT_STDLIB_ASSERTIONS
170
+ "Enable internal checks for the Swift standard library (useful for debugging the library itself, does not affect checks required for safety)"
171
+ "${SWIFT_STDLIB_ASSERTIONS_default} " )
172
+
173
+ option (SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER
174
+ "Use the host compiler and not the internal clang to build the swift runtime"
175
+ FALSE )
176
+
177
+ set (SWIFT_SDKS "" CACHE STRING
178
+ "If non-empty, limits building target binaries only to specified SDKs (despite other SDKs being available)" )
179
+
180
+ set (SWIFT_PRIMARY_VARIANT_SDK "" CACHE STRING
181
+ "Primary SDK for target binaries" )
182
+ set (SWIFT_PRIMARY_VARIANT_ARCH "" CACHE STRING
183
+ "Primary arch for target binaries" )
184
+
185
+ set (SWIFT_NATIVE_LLVM_TOOLS_PATH "" CACHE STRING
186
+ "Path to the directory that contains LLVM tools that are executable on the build machine" )
187
+
188
+ set (SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
189
+ "Path to the directory that contains Clang tools that are executable on the build machine" )
190
+
191
+ set (SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
192
+ "Path to the directory that contains Swift tools that are executable on the build machine" )
193
+
194
+ option (SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
195
+ "Generate .swiftinterface files alongside .swiftmodule files"
196
+ TRUE )
197
+
198
+ option (SWIFT_STDLIB_ENABLE_SIB_TARGETS
199
+ "Should we generate sib targets for the stdlib or not?"
200
+ FALSE )
201
+
191
202
#
192
203
# User-configurable Android specific options.
193
204
#
0 commit comments