Skip to content

Commit

Permalink
Use LinuxMain on all platforms except Darwin (swiftlang#2734)
Browse files Browse the repository at this point in the history
* Guard planLinuxMain only on Darwin platforms

LinuxMain is also used to run tests on WebAssembly/WASI (and potentially on Android, Windows etc)

* Append from linuxMainMap w/ all non-Darwin triples
  • Loading branch information
MaxDesiatov authored and kateinoigakukun committed Sep 25, 2020
1 parent 88c12e9 commit a36331a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Build/BuildPlan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ public class BuildPlan {
_ buildParameters: BuildParameters,
_ graph: PackageGraph
) throws -> [(ResolvedProduct, SwiftTargetBuildDescription)] {
guard buildParameters.triple.isLinux() else {
guard !buildParameters.triple.isDarwin() else {
return []
}

Expand Down Expand Up @@ -1530,7 +1530,7 @@ public class BuildPlan {
}
}

if buildParameters.triple.isLinux() {
if !buildParameters.triple.isDarwin() {
if product.type == .test {
linuxMainMap[product].map{ staticTargets.append($0) }
}
Expand Down

0 comments on commit a36331a

Please sign in to comment.