Files
swift-atomics/Package.swift
T
Karoy Lorentey 9ad914d118 Make double-wide atomics conditional on platform support
Linux on x86_64 unfortunately disables support for cmpxchg16 by default, making double-wide atomic operations fall back to using locks. We cannot currently override this on the package level, so stop providing double-wide atomics in this configuration by default.

To enable codegen support for double-wide atomics on Linux/x86_64, compile the package with `-Xcc -mcx16 -Xswiftc -DENABLE_DOUBLEWIDE_ATOMICS`.
2020-10-09 14:52:33 -07:00

35 lines
920 B
Swift

// swift-tools-version:5.1
//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 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-atomics",
products: [
.library(
name: "Atomics",
targets: ["Atomics"]),
],
targets: [
.target(name: "_AtomicsShims"),
.target(
name: "Atomics",
dependencies: ["_AtomicsShims"]
),
.testTarget(
name: "AtomicsTests",
dependencies: ["Atomics"]
),
]
)