Skip to content

Commit e6ffbb2

Browse files
committed
PackageModel: pass along -sdk property on Windows
If the user specifies `-sdk` always prefer that over the `SDKROOT` environment variable. We would previously honor that but then fail to pass along the argument. We never noticed this as `SDKROOT` has always been set up until this point. With newer SDKs, this will become less a guarantee.
1 parent 654b94b commit e6ffbb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PackageModel/UserToolchain.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public final class UserToolchain: Toolchain {
271271
return destination.extraSwiftCFlags
272272
}
273273

274-
return (triple.isDarwin() || triple.isAndroid() || triple.isWASI()
274+
return (triple.isDarwin() || triple.isAndroid() || triple.isWASI() || triple.isWindows()
275275
? ["-sdk", sdk.pathString]
276276
: [])
277277
+ destination.extraSwiftCFlags

0 commit comments

Comments
 (0)