Skip to content

Simplify minimum deployment target on Darwin platforms (still requiring macOS 10.15+, adding iOS 13+) #3557

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
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
14 changes: 4 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
import PackageDescription
import class Foundation.ProcessInfo

// We default to a 10.10 minimum deployment target for clients of libSwiftPM,
// but allow overriding it when building for a toolchain.

let macOSPlatform: SupportedPlatform
if let deploymentTarget = ProcessInfo.processInfo.environment["SWIFTPM_MACOS_DEPLOYMENT_TARGET"] {
macOSPlatform = .macOS(deploymentTarget)
} else {
macOSPlatform = .macOS(.v10_15)
}

/** SwiftPMDataModel is the subset of SwiftPM product that includes just its data model.
This allowis some clients (such as IDEs) that use SwiftPM's data model but not its build system
Expand Down Expand Up @@ -64,7 +55,10 @@ let autoProducts = [swiftPMProduct, swiftPMDataModelProduct]

let package = Package(
name: "SwiftPM",
platforms: [macOSPlatform],
platforms: [
.macOS(.v10_15),
.iOS(.v13)
],
products:
autoProducts.flatMap {
[
Expand Down