Skip to content

Commit 25e1c9f

Browse files
committed
Add Missing _StringProcessing Dependencies
These two modules themselves depend on modules that implicitly import the _StringProcessing library. Take OSLog as an example, which imports ObjectiveC, which implicitly imports _StringProcessing. Thus, we can get into the following bad scenario: - A compiler at module format X builds _StringProcessing - A rebase is performed and the compiler is rebuilt at module format Y > X - OSLog builds before _StringProcessing (since it has no dependency) - But _StringProcessing is at module format X < Y, so we have to rebuild it This normally manifests as an error at the desks of compiler engineers about a mismatch in the module format for _StringProcessing. Let's fix that by making CMake schedule _StringProcessing before them.
1 parent 99dcabd commit 25e1c9f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

stdlib/private/OSLog/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
set(swift_oslog_darwin_dependencies "")
22
if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY)
33
list(APPEND swift_oslog_darwin_dependencies "_Concurrency")
4-
endif ()
4+
endif()
5+
if (SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING)
6+
list(APPEND swift_oslog_darwin_dependencies "_StringProcessing")
7+
endif()
58

69
add_swift_target_library(swiftOSLogTestHelper
710
IS_SDK_OVERLAY

stdlib/private/StdlibUnittest/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ if (SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY)
2424
list(APPEND swift_stdlib_unittest_link_libraries "swift_Concurrency")
2525
list(APPEND swift_stdlib_unittest_modules "_Concurrency")
2626
endif()
27+
if (SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING)
28+
list(APPEND swift_stdlib_unittest_modules "_StringProcessing")
29+
endif()
2730

2831
add_swift_target_library(swiftStdlibUnittest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
2932
# This file should be listed the first. Module name is inferred from the

0 commit comments

Comments
 (0)