Skip to content

Commit 699eddf

Browse files
authored
Merge pull request #60764 from al45tair/eng/PR-99125585
[Threading] Move swiftCompatibilityThreading to toolchain.
2 parents 000df95 + 21b165a commit 699eddf

File tree

5 files changed

+18
-22
lines changed

5 files changed

+18
-22
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,9 +1163,6 @@ endif()
11631163
if(SWIFT_BUILD_STDLIB)
11641164
add_subdirectory(stdlib)
11651165
else()
1166-
# Some of the things below depend on the threading library
1167-
add_subdirectory(stdlib/public/Threading)
1168-
11691166
if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
11701167
add_subdirectory(stdlib/toolchain)
11711168
endif()

lib/Threading/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# If you update this, you also need to update the CMakeLists.txt file in
2-
# stdlib/public/Threading
2+
# stdlib/public/Threading AND the one in stdlib/toolchain/CompatibilityThreading
33

44
# Note that it is *not* an error that Errors.cpp is only listed here.
5-
# It shouldn't be in stdlib/public/Threading because that is an OBJECT_LIBRARY
6-
# and things that use that should be defining their own fatal error handler.
5+
# It shouldn't be in the other places because those are OBJECT_LIBRARYs
6+
# and things that use them should be defining their own fatal error handler.
77

88
add_swift_host_library(swiftThreading STATIC
99
C11.cpp

stdlib/public/Threading/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,3 @@ add_swift_target_library(swiftThreading OBJECT_LIBRARY
1010
"${SWIFT_SOURCE_DIR}/lib/Threading/Pthreads.cpp"
1111
"${SWIFT_SOURCE_DIR}/lib/Threading/Win32.cpp"
1212
INSTALL_IN_COMPONENT never_install)
13-
14-
if(SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT)
15-
# This is only used by the compatibility libraries
16-
add_swift_target_library(swiftCompatibilityThreading OBJECT_LIBRARY
17-
"${SWIFT_SOURCE_DIR}/lib/Threading/C11.cpp"
18-
"${SWIFT_SOURCE_DIR}/lib/Threading/Linux.cpp"
19-
"${SWIFT_SOURCE_DIR}/lib/Threading/Pthreads.cpp"
20-
"${SWIFT_SOURCE_DIR}/lib/Threading/Win32.cpp"
21-
INSTALL_IN_COMPONENT never_install
22-
TARGET_SDKS ${SWIFT_DARWIN_PLATFORMS}
23-
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
24-
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
25-
DEPLOYMENT_VERSION_TVOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_TVOS}
26-
DEPLOYMENT_VERSION_WATCHOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_WATCHOS}
27-
)
28-
endif()

stdlib/toolchain/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ if(SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT)
5252
add_subdirectory(Compatibility51)
5353
add_subdirectory(CompatibilityDynamicReplacements)
5454
add_subdirectory(CompatibilityConcurrency)
55+
add_subdirectory(CompatibilityThreading)
5556
endif()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This is the counterpart to lib/Threading/CMakeLists.txt. Any updates
2+
# need to be reflected in both places.
3+
4+
add_swift_target_library(swiftCompatibilityThreading OBJECT_LIBRARY
5+
"${SWIFT_SOURCE_DIR}/lib/Threading/C11.cpp"
6+
"${SWIFT_SOURCE_DIR}/lib/Threading/Linux.cpp"
7+
"${SWIFT_SOURCE_DIR}/lib/Threading/Pthreads.cpp"
8+
"${SWIFT_SOURCE_DIR}/lib/Threading/Win32.cpp"
9+
INSTALL_IN_COMPONENT never_install
10+
TARGET_SDKS ${SWIFT_DARWIN_PLATFORMS}
11+
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
12+
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
13+
DEPLOYMENT_VERSION_TVOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_TVOS}
14+
DEPLOYMENT_VERSION_WATCHOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_WATCHOS})

0 commit comments

Comments
 (0)