mirror of
https://github.com/apple/swift-numerics
synced 2026-11-26 04:57:53 +00:00
I had thought that we could get away with just using @_silgen_name to wrap the platform libm functions in ElementaryFunctions conformances, but that's now failing in release builds when both ElementaryFunctions and the Platform module are imported (and actually crashing swiftc). Fall back on the previous strategy of using C header shims. This adds an extra layer of source abstraction, but we're still able to optimize it away at compile time, even in unoptimized builds, so we can live with it for now.
33 lines
1.1 KiB
Swift
33 lines
1.1 KiB
Swift
// swift-tools-version:5.0
|
|
//===--- Package.swift ----------------------------------------*- swift -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2019 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "swift-numerics",
|
|
products: [
|
|
.library(name: "Complex", targets: ["Complex"]),
|
|
.library(name: "ElementaryFunctions", targets: ["ElementaryFunctions"]),
|
|
],
|
|
dependencies: [
|
|
],
|
|
targets: [
|
|
.target(name: "Complex", dependencies: ["ElementaryFunctions"]),
|
|
.target(name: "ElementaryFunctions", dependencies: ["NumericsShims"]),
|
|
.target(name: "NumericsShims", dependencies: []),
|
|
|
|
.testTarget(name: "ComplexTests", dependencies: ["Complex"]),
|
|
.testTarget(name: "ElementaryFunctionTests", dependencies: ["ElementaryFunctions"]),
|
|
]
|
|
)
|