Skip to content

Commit 5803eaf

Browse files
committed
Let's try a different approach.
1 parent cc53a7b commit 5803eaf

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

Package.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ let package = Package(
5050
),
5151

5252
// MARK: - Implementation details
53-
.systemLibrary(
54-
name: "_NumericsShims"
53+
.target(
54+
name: "_NumericsShims",
55+
exclude: excludedFilenames,
56+
linkerSettings: [.linkedLibrary("m", .when(platforms: [.linux]))]
5557
),
5658

5759
.target(
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//===--- NumericsShims.c --------------------------------------*- swift -*-===//
2+
//
3+
// This source file is part of the Swift Numerics open source project
4+
//
5+
// Copyright (c) 2019 Apple Inc. and the Swift Numerics project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
//
10+
//===----------------------------------------------------------------------===//
11+
12+
// This file exists only to trigger the NumericShims module to build; without
13+
// it swiftpm won't build anything, and then the shims are not available for
14+
// the modules that need them.
15+
16+
// If any shims are added that are not pure header inlines, whatever runtime
17+
// support they require can be added to this file.
18+
19+
#include "_NumericsShims.h"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
module _NumericsShims {
22
header "_NumericsShims.h"
3-
link "m"
43
}

0 commit comments

Comments
 (0)