Skip to content

Move SWIFT_STDLIB_ENABLE_OBJC_INTEROP back to the main CMakeLists.txt #39816

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
Oct 20, 2021
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
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,18 @@ option(SWIFT_REPORT_STATISTICS
"Create json files which contain internal compilation statistics"
FALSE)

# Only Darwin platforms enable ObjC interop by default.
if("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*)")
set(SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default TRUE)
else()
set(SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default FALSE)
endif()

# Used by stdlib/toolchain as well, so this cannot be in stdlib/CMakeLists.txt
option(SWIFT_STDLIB_ENABLE_OBJC_INTEROP
"Should stdlib be built with Obj-C interop."
"${SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default}")

#
# User-configurable experimental options. Do not use in production builds.
#
Expand Down
11 changes: 0 additions & 11 deletions stdlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ else()
set(SWIFT_STDLIB_HAS_ASL_default FALSE)
endif()

# Only Darwin platforms enable ObjC interop by default.
if("${SWIFT_HOST_VARIANT_SDK}" MATCHES "(OSX|IOS*|TVOS*|WATCHOS*)")
set(SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default TRUE)
else()
set(SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default FALSE)
endif()

#
# User-configurable options for the standard library.
#
Expand All @@ -86,10 +79,6 @@ option(SWIFT_STDLIB_STABLE_ABI
"Should stdlib be built with stable ABI (library evolution, resilience)."
"${SWIFT_STDLIB_STABLE_ABI_default}")

option(SWIFT_STDLIB_ENABLE_OBJC_INTEROP
"Should stdlib be built with Obj-C interop."
"${SWIFT_STDLIB_ENABLE_OBJC_INTEROP_default}")

option(SWIFT_ENABLE_MODULE_INTERFACES
"Generate .swiftinterface files alongside .swiftmodule files"
"${SWIFT_STDLIB_STABLE_ABI}")
Expand Down