Skip to content

Foundation: remove unnecessary -DDEPLOYMENT_ENABLE_LIBDISPATCH #2459

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
Aug 16, 2019
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
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ add_swift_library(Foundation
SWIFT_FLAGS
-Xcc -F${CMAKE_CURRENT_BINARY_DIR}
-DDEPLOYMENT_RUNTIME_SWIFT
-DDEPLOYMENT_ENABLE_LIBDISPATCH
-I;${ICU_INCLUDE_DIR}
${libdispatch_cflags}
$<$<BOOL:ENABLE_TESTING>:-enable-testing>
Expand Down Expand Up @@ -334,7 +333,6 @@ add_swift_library(FoundationNetworking
-DDEPLOYMENT_RUNTIME_SWIFT
-DNS_BUILDING_FOUNDATION_NETWORKING
-Xcc -F${CMAKE_CURRENT_BINARY_DIR}
-DDEPLOYMENT_ENABLE_LIBDISPATCH
-I;${CMAKE_CURRENT_BINARY_DIR}/swift
${libdispatch_cflags}
$<$<BOOL:ENABLE_TESTING>:-enable-testing>
Expand Down Expand Up @@ -376,7 +374,6 @@ add_swift_library(FoundationXML
-DDEPLOYMENT_RUNTIME_SWIFT
-DNS_BUILDING_FOUNDATION_NETWORKING
-Xcc -F${CMAKE_CURRENT_BINARY_DIR}
-DDEPLOYMENT_ENABLE_LIBDISPATCH
-I;${CMAKE_CURRENT_BINARY_DIR}/swift
${libdispatch_cflags}
$<$<BOOL:ENABLE_TESTING>:-enable-testing>
Expand Down
8 changes: 2 additions & 6 deletions Foundation/NSData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
//

import CoreFoundation

#if DEPLOYMENT_ENABLE_LIBDISPATCH
import Dispatch
#endif

extension NSData {
public struct ReadingOptions : OptionSet {
Expand Down Expand Up @@ -268,8 +265,7 @@ open class NSData : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
} else if let data = value as? NSData {
return isEqual(to: data._swiftObject)
}

#if DEPLOYMENT_ENABLE_LIBDISPATCH

if let data = value as? DispatchData {
if data.count != length {
return false
Expand All @@ -279,7 +275,7 @@ open class NSData : NSObject, NSCopying, NSMutableCopying, NSSecureCoding {
return memcmp(bytes1, bytes2, length) == 0
}
}
#endif

return false
}

Expand Down