Skip to content

Commit 83f8454

Browse files
authored
Merge pull request #68504 from kubamracek/remove-essential-stdlib
[stdlib] Remove the essential/non-essential file split in the stdlib
2 parents 7371a8d + b625bf9 commit 83f8454

File tree

1 file changed

+13
-36
lines changed

1 file changed

+13
-36
lines changed

stdlib/public/core/CMakeLists.txt

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@
1010
#
1111
#===----------------------------------------------------------------------===#
1212

13-
# The list of sources without which it's impossible to build a core
14-
# standard library. Try to add new standard library sources to
15-
# SWIFTLIB_SOURCES, below, rather than SWIFTLIB_ESSENTIAL, if
16-
# possible, to improve layering. Check that you got it right by
17-
# configuring with -DSWIFT_CHECK_ESSENTIAL_STDLIB=YES
18-
set(SWIFTLIB_ESSENTIAL
19-
### PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER ###
13+
# The complete list of sources in the core standard library.
14+
set(SWIFTLIB_SOURCES
15+
### "ESSENTIAL" SOURCES
16+
### -- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER ###
2017
# Some files can't be sorted alphabetically, see notes in the list below.
2118
Algorithm.swift
2219
ArrayBody.swift
@@ -199,22 +196,10 @@ set(SWIFTLIB_ESSENTIAL
199196
StringGraphemeBreaking.swift # ORDER DEPENDENCY: Must follow UTF16.swift
200197
ValidUTF8Buffer.swift
201198
WriteBackMutableSlice.swift
202-
MigrationSupport.swift)
203-
204-
set(SWIFTLIB_ESSENTIAL_GYB_SOURCES
205-
AtomicInt.swift.gyb
206-
FloatingPointParsing.swift.gyb
207-
FloatingPointTypes.swift.gyb
208-
IntegerTypes.swift.gyb
209-
UnsafeBufferPointer.swift.gyb
210-
UnsafeRawBufferPointer.swift.gyb
211-
)
199+
MigrationSupport.swift
212200

213-
# The complete list of sources in the core standard library. Includes
214-
# all the essential sources listed above.
215-
set(SWIFTLIB_SOURCES
216-
${SWIFTLIB_ESSENTIAL}
217-
### PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER ###
201+
### "NON-ESSENTIAL" SOURCES, LAYERED ON TOP OF THE "ESSENTIAL" ONES
202+
### -- PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER ###
218203
Availability.swift
219204
CollectionDifference.swift
220205
CollectionOfOne.swift
@@ -236,7 +221,12 @@ set(SWIFTLIB_SOURCES
236221
)
237222

238223
set(SWIFTLIB_GYB_SOURCES
239-
${SWIFTLIB_ESSENTIAL_GYB_SOURCES}
224+
AtomicInt.swift.gyb
225+
FloatingPointParsing.swift.gyb
226+
FloatingPointTypes.swift.gyb
227+
IntegerTypes.swift.gyb
228+
UnsafeBufferPointer.swift.gyb
229+
UnsafeRawBufferPointer.swift.gyb
240230
Int128.swift.gyb
241231
Tuple.swift.gyb
242232
)
@@ -267,10 +257,6 @@ elseif(SWIFT_PRIMARY_VARIANT_SDK STREQUAL "WINDOWS")
267257
list(APPEND swift_core_private_link_libraries shell32;DbgHelp;Synchronization)
268258
endif()
269259

270-
option(SWIFT_CHECK_ESSENTIAL_STDLIB
271-
"Check core standard library layering by linking its essential subset"
272-
FALSE)
273-
274260
if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel")
275261
list(APPEND swift_stdlib_compile_flags "-Xllvm" "-sil-inline-generics")
276262
list(APPEND swift_stdlib_compile_flags "-Xllvm" "-sil-partial-specialization")
@@ -292,15 +278,6 @@ list(APPEND swift_stdlib_compile_flags "-Xfrontend" "-enable-experimental-concis
292278
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "Macros")
293279
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "FreestandingMacros")
294280

295-
if(SWIFT_CHECK_ESSENTIAL_STDLIB)
296-
add_swift_target_library(swift_stdlib_essential ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_STDLIB_CORE
297-
INSTALL_IN_COMPONENT never_install
298-
${SWIFTLIB_ESSENTIAL}
299-
GYB_SOURCES
300-
${SWIFTLIB_ESSENTIAL_GYB_SOURCES})
301-
target_link_libraries(swift_stdlib_essential ${RUNTIME_DEPENDENCY})
302-
endif()
303-
304281
set(swift_core_incorporate_object_libraries)
305282
list(APPEND swift_core_incorporate_object_libraries swiftRuntime)
306283
list(APPEND swift_core_incorporate_object_libraries swiftLLVMSupport)

0 commit comments

Comments
 (0)