Skip to content

Commit 4ee4236

Browse files
committed
Address review comments for Package.swift
1 parent b85b0a1 commit 4ee4236

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

Package.swift

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ let coreFoundationBuildSettings: [CSetting] = [
77
.headerSearchPath("internalInclude"),
88
.define("DEBUG", .when(configuration: .debug)),
99
.define("CF_BUILDING_CF"),
10-
.define("DEPLOYMENT_RUNTIME_SWIFT", .when(platforms: [.linux])),
1110
.define("DEPLOYMENT_ENABLE_LIBDISPATCH"),
1211
.define("HAVE_STRUCT_TIMESPEC"),
1312
.define("SWIFT_CORELIBS_FOUNDATION_HAS_THREADS"),
@@ -35,32 +34,23 @@ let coreFoundationBuildSettings: [CSetting] = [
3534
.unsafeFlags(["-I/usr/lib/swift"], .when(platforms: [.linux, .android])) // dispatch
3635
]
3736

38-
#if os(macOS)
3937
let coreFoundationLinkerSettings: [LinkerSetting] = [
40-
.unsafeFlags([
41-
"-Xlinker",
42-
"-alias_list",
43-
"-Xlinker",
44-
"\(Context.packageDirectory)/Sources/CoreFoundation/DarwinSymbolAliases",
45-
])
38+
.unsafeFlags(["-Xlinker", "-alias_list", "-Xlinker", "\(Context.packageDirectory)/Sources/CoreFoundation/DarwinSymbolAliases",], .when(platforms: [.macOS]))
4639
]
47-
#else
48-
let coreFoundationLinkerSettings: [LinkerSetting] = []
49-
#endif
5040

5141
// For _CFURLSessionInterface, _CFXMLInterface
5242
let interfaceBuildSettings: [CSetting] = [
5343
.headerSearchPath("../CoreFoundation/internalInclude"),
5444
.headerSearchPath("../CoreFoundation/include"),
5545
.define("DEBUG", .when(configuration: .debug)),
5646
.define("CF_BUILDING_CF"),
57-
.define("DEPLOYMENT_RUNTIME_SWIFT"),
5847
.define("DEPLOYMENT_ENABLE_LIBDISPATCH"),
5948
.define("HAVE_STRUCT_TIMESPEC"),
6049
.define("SWIFT_CORELIBS_FOUNDATION_HAS_THREADS"),
6150
.define("_GNU_SOURCE", .when(platforms: [.linux, .android])),
6251
.define("TARGET_OS_WASI", to: "0", .when(platforms: [.macOS])),
6352
.define("TARGET_OS_BSD", to: "0", .when(platforms: [.macOS])),
53+
.define("TARGET_OS_ANDROID", to: "0", .when(platforms: [.macOS])),
6454
.define("INCLUDE_OBJC", to: "1", .when(platforms: [.macOS])),
6555
.unsafeFlags([
6656
"-Wno-shorten-64-to-32",
@@ -81,7 +71,7 @@ let interfaceBuildSettings: [CSetting] = [
8171
]
8272

8373
let swiftBuildSettings: [SwiftSetting] = [
84-
.define("DEPLOYMENT_RUNTIME_SWIFT"),
74+
.define("DEPLOYMENT_RUNTIME_SWIFT"),
8575
.define("SWIFT_CORELIBS_FOUNDATION_HAS_THREADS"),
8676
]
8777

0 commit comments

Comments
 (0)