Skip to content

Respect SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET if it is set in the environment #220

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
Jun 9, 2021
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
13 changes: 12 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
This source file is part of the Swift.org open source project

Copyright (c) 2019 - 2020 Apple Inc. and the Swift project authors
Copyright (c) 2019 - 2021 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See http://swift.org/LICENSE.txt for license information
Expand All @@ -12,9 +12,20 @@


import PackageDescription
import class Foundation.ProcessInfo

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

let package = Package(
name: "swift-tools-support-core",
platforms: [
macOSPlatform,
],
products: [
.library(
name: "SwiftToolsSupport",
Expand Down