Skip to content

[Threading] Fix compatibility library deployment target issue. #60013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions stdlib/public/Threading/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ add_swift_target_library(swiftThreading OBJECT_LIBRARY
"${SWIFT_SOURCE_DIR}/lib/Threading/Win32.cpp"
INSTALL_IN_COMPONENT never_install)

# This is only used by the compatibility libraries
add_swift_target_library(swiftThreadingWithFatal OBJECT_LIBRARY
"${SWIFT_SOURCE_DIR}/lib/Threading/C11.cpp"
"${SWIFT_SOURCE_DIR}/lib/Threading/Linux.cpp"
"${SWIFT_SOURCE_DIR}/lib/Threading/Pthreads.cpp"
"${SWIFT_SOURCE_DIR}/lib/Threading/Win32.cpp"
"${SWIFT_SOURCE_DIR}/lib/Threading/Errors.cpp"
INSTALL_IN_COMPONENT never_install)
if(SWIFT_STDLIB_SUPPORT_BACK_DEPLOYMENT)
# This is only used by the compatibility libraries
add_swift_target_library(swiftCompatibilityThreading OBJECT_LIBRARY
"${SWIFT_SOURCE_DIR}/lib/Threading/C11.cpp"
"${SWIFT_SOURCE_DIR}/lib/Threading/Linux.cpp"
"${SWIFT_SOURCE_DIR}/lib/Threading/Pthreads.cpp"
"${SWIFT_SOURCE_DIR}/lib/Threading/Win32.cpp"
INSTALL_IN_COMPONENT never_install
TARGET_SDKS ${SWIFT_DARWIN_PLATFORMS}
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
DEPLOYMENT_VERSION_TVOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_TVOS}
DEPLOYMENT_VERSION_WATCHOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_WATCHOS}
)
endif()
2 changes: 1 addition & 1 deletion stdlib/toolchain/Compatibility50/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_swift_target_library("${library_name}" STATIC

C_COMPILE_FLAGS ${CXX_COMPILE_FLAGS}
LINK_FLAGS ${CXX_LINK_FLAGS}
INCORPORATE_OBJECT_LIBRARIES swiftThreading
INCORPORATE_OBJECT_LIBRARIES swiftCompatibilityThreading
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
Expand Down
2 changes: 1 addition & 1 deletion stdlib/toolchain/Compatibility51/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ add_swift_target_library("${library_name}" STATIC

C_COMPILE_FLAGS ${CXX_COMPILE_FLAGS}
LINK_FLAGS ${CXX_LINK_FLAGS}
INCORPORATE_OBJECT_LIBRARIES swiftThreading
INCORPORATE_OBJECT_LIBRARIES swiftCompatibilityThreading
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
Expand Down
2 changes: 1 addition & 1 deletion stdlib/toolchain/CompatibilityConcurrency/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ add_swift_target_library("${library_name}" STATIC

C_COMPILE_FLAGS ${CXX_COMPILE_FLAGS}
LINK_FLAGS ${CXX_LINK_FLAGS}
INCORPORATE_OBJECT_LIBRARIES swiftThreading
INCORPORATE_OBJECT_LIBRARIES swiftCompatibilityThreading
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ add_swift_target_library("${library_name}" STATIC

C_COMPILE_FLAGS ${CXX_COMPILE_FLAGS}
LINK_FLAGS ${CXX_LINK_FLAGS}
INCORPORATE_OBJECT_LIBRARIES swiftThreading
INCORPORATE_OBJECT_LIBRARIES swiftCompatibilityThreading
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
Expand Down