Skip to content
Draft
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
10 changes: 0 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,6 @@ list(APPEND _Foundation_common_build_flags
"-Wno-switch"
"-fblocks")

if(NOT CMAKE_SYSTEM_NAME STREQUAL "WASI")
list(APPEND _Foundation_common_build_flags
"-DDEPLOYMENT_ENABLE_LIBDISPATCH"
"-DSWIFT_CORELIBS_FOUNDATION_HAS_THREADS")
endif()

if(NOT "${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
list(APPEND _Foundation_common_build_flags
"-fconstant-cfstrings"
Expand Down Expand Up @@ -245,10 +239,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WASI")
list(APPEND _Foundation_swift_build_flags "SHELL:-Xcc -D${def}")
list(APPEND _Foundation_common_build_flags "-D${def}")
endforeach()
else()
# Assume we have threads on other platforms
list(APPEND _Foundation_swift_build_flags
"-DSWIFT_CORELIBS_FOUNDATION_HAS_THREADS")
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
Expand Down
17 changes: 0 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@

import PackageDescription

let platformsWithThreads: [Platform] = [
.iOS,
.macOS,
.tvOS,
.watchOS,
.macCatalyst,
.driverKit,
.android,
.linux,
.windows,
]

var dispatchIncludeFlags: [CSetting] = []
if let environmentPath = Context.environment["DISPATCH_INCLUDE_PATH"] {
dispatchIncludeFlags.append(.unsafeFlags([
Expand Down Expand Up @@ -92,10 +80,8 @@ let coreFoundationBuildSettings: [CSetting] = [
.define("DEBUG", .when(configuration: .debug)),
.define("CF_BUILDING_CF"),
.define("CF_WINDOWS_EXECUTABLE_INITIALIZER", .when(platforms: [.windows])), // Ensure __CFInitialize is run even when statically linked into an executable
.define("DEPLOYMENT_ENABLE_LIBDISPATCH", .when(platforms: platformsWithThreads)),
.define("DEPLOYMENT_RUNTIME_SWIFT"),
.define("HAVE_STRUCT_TIMESPEC"),
.define("SWIFT_CORELIBS_FOUNDATION_HAS_THREADS", .when(platforms: platformsWithThreads)),
.define("_GNU_SOURCE", .when(platforms: [.linux, .android])),
.define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])),
.unsafeFlags([
Expand Down Expand Up @@ -124,9 +110,7 @@ let interfaceBuildSettings: [CSetting] = [
.headerSearchPath("../CoreFoundation/internalInclude"),
.define("DEBUG", .when(configuration: .debug)),
.define("CF_BUILDING_CF"),
.define("DEPLOYMENT_ENABLE_LIBDISPATCH"),
.define("HAVE_STRUCT_TIMESPEC"),
.define("SWIFT_CORELIBS_FOUNDATION_HAS_THREADS", .when(platforms: platformsWithThreads)),
.define("_GNU_SOURCE", .when(platforms: [.linux, .android])),
.define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])),
.unsafeFlags([
Expand All @@ -149,7 +133,6 @@ let interfaceBuildSettings: [CSetting] = [

let swiftBuildSettings: [SwiftSetting] = [
.define("DEPLOYMENT_RUNTIME_SWIFT"),
.define("SWIFT_CORELIBS_FOUNDATION_HAS_THREADS"),
.swiftLanguageMode(.v6),
.unsafeFlags([
"-Xfrontend",
Expand Down