Skip to content

Commit e8a3ddb

Browse files
committed
Move the -lm link command to RealModule (from _NumericsShims).
Hopefully this resolves some niche link errors that we've seen sporadically.
1 parent 182c9b2 commit e8a3ddb

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ let package = Package(
4646
.target(
4747
name: "RealModule",
4848
dependencies: ["_NumericsShims"],
49-
exclude: excludedFilenames
49+
exclude: excludedFilenames,
50+
linkerSettings: [
51+
.linkedLibrary("m", .when(platforms: [.linux, .android]))
52+
]
5053
),
5154

5255
// MARK: - Implementation details
5356
.target(
5457
name: "_NumericsShims",
55-
exclude: excludedFilenames,
56-
linkerSettings: [
57-
.linkedLibrary("m", .when(platforms: [.linux, .android]))
58-
]
58+
exclude: excludedFilenames
5959
),
6060

6161
.target(

[email protected]

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,16 @@ let package = Package(
4646
.target(
4747
name: "RealModule",
4848
dependencies: ["_NumericsShims"],
49-
exclude: excludedFilenames
49+
exclude: excludedFilenames,
50+
linkerSettings: [
51+
.linkedLibrary("m", .when(platforms: [.linux, .android]))
52+
]
5053
),
5154

5255
// MARK: - Implementation details
5356
.target(
5457
name: "_NumericsShims",
55-
exclude: excludedFilenames,
56-
linkerSettings: [.linkedLibrary("m", .when(platforms: [.linux, .android]))]
58+
exclude: excludedFilenames
5759
),
5860

5961
.target(

0 commit comments

Comments
 (0)