mirror of
https://github.com/apple/swift-atomics
synced 2026-11-25 04:37:47 +00:00
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`.
35 lines
920 B
Swift
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"]
|
|
),
|
|
]
|
|
)
|